How to add www before my domain name?

How to add www before my domain name?

My domain name is latestworld.ml
I want it to open with www.latestworld.ml
How to do it?

@1Anuj1 said:
How to add www before my domain name?

My domain name is latestworld.ml
I want it to open with www.latestworld.ml
How to do it?

You can do this by inserting this code to your .htaccess file.

Insert this:
RewriteEngine On
RewriteCond %{HTTP_HOST} !=""
RewriteCond %{HTTP_HOST} !^www\\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

HI

the world trend is to no longer use www (simpler for writing, remember, wordpress, etc.)

but as I think that you will soon use cloudflare and benefits of https, etc. (green lock)
then the easiest solution is to use the cloudflare and it will automatically handle the www subdomain for you

https://support.cloudflare.com/hc/en-us/articles/201720164-Step-2-Create-a-Cloudflare-account-and-add-a-website

if you want that all your visitors go to the www version then