How to remove www from your URL

There are some website owners do not want their URL have www. Like my site I don’t want to have a www in my URL. But there are some cases that Big companies have www in their URL like Facebook and Google

This code will help you to remove it.

Put this code in your htaccess file and voila your www will be remove.

what if you want to have a www in your URL,

This code now will force your site to have www in your URL

 

Here is the result
remove-www