How to add www in url through .htaccess?

Recently I was working on a project and SEO team requested to add WWW forcefully in project URL. I asked why, they said.
“Must have www in your URL! Google Like it.”
So here is .htaccess snippet to force a url with WWW
When you will type it will automatically become

This is how I did in this site. I am telling you one .htaccess secret. You can experience here only.


One thought on “How to add www in url through .htaccess?

Leave a Reply

Your email address will not be published. Required fields are marked *