Jump to content

how to force www versus no www ?


Recommended Posts

Add the following to your .htaccess file to force all URLs to have www at the beginning:

RewriteCond %{http_host} ^yoursite.com [nc]
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [r=301,nc]



You should also install the "Canonical URL" module and enter www.yoursite.com there so search engines know to use www.

Link to comment
Share on other sites

  • 4 weeks later...
  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...