• Skip to primary navigation
  • Skip to main content
  • Skip to footer

Ty the Web Guy

Everything Web™ Since 1995

  • Home
  • About Me
  • Experience
  • Services
  • Contact

Remove the WWW!

July 15, 2015 By Ty Cahill

There are some very strong SEO benefits to standardizing the links to your website by removing the “www” from your URLs:

  • Preventions Google search engine penalties for duplicate content
  • Less bandwidth usage if you have many links per page
  • Shorter URLs

Removing the WWW from your page URLs can be done in your .htaccess file so you won’t have to go to every page of your website and remove the “www” from your links. But going forward, it’s best to never use the WWW in your links or marketing material, since the .htaccess file will create a redirect, and limiting the number of redirects is always a good thing.

The .htaccess Code

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^domain.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [L,R=301]

And if you’d prefer to use “www” in all of your URLs, you can use this code:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]

Don’t forget to replace the “domain.com” text with your domain name! :-)

Filed Under: Uncategorized

Footer

Ty the Web Guy has been immersed in web design and development for over 20 years. Serving businesses and non-profits locally in the Sacramento area and across the United States. Find out how Ty can help you!

Call 1-800-754-5470 or email [email protected].

Copyright © 2021 Ty the Web Guy · All rights reserved.

Ty the Web Guy and Everything Web are trademarks of Ty Cahill.