Categories
Apache

How to force no-www URLs to www version URLs with htaccess?

For SEO reasons, you might always use (or remove) the www prefix in your urls. The following snippet will add the www to your website url and redirect any url with the  non-www to the www version.

By Arjun

I am Arjun from Hyderabad (India). I have been working as a software engineer from the last 7+ years, and it is my passion to learn new things and implement them as a practice. Aside from work, I like gardening and spending time with pets.

Leave a Reply

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