If you are new to my blog, please let me first welcome you. If you've been here before and enjoy reading "Dr. Mike's Steak Dinner," please consider subscribing to our rss feed as well as linking to us in your blogroll. Thanks. :)

You can also see when I've updated by following me on Twitter. Please add the Dr_Mike account to your list.

Remove the www from URLs

axe.jpgAwhile back, I did a quick tutorial on how to remove the index.html and index.php files from your urls.  I did it because having both in my stats was driving me nuts and causing dupe urls within Google as well.  That splits apart any SEO benefit from inbound links and makes dealing with stats numbers a royal pain.

Another problem is with the www bit in the urls.  I know I'm infamous for point out how folks misuse the www bit this all the time as some networks still have problems resolving urls when an extra layer is added to the domain.

The problem though some people have when setting up such a feature is that they make the with-www or without-www not resolve.  That's an issue because you're losing half of the folks don't use domains the same way you do.

Another problem is that you're splitting in half any SEO benefit you may get from inbound links.  Some folks will link to your site with the www included, some will not use the 'www' bit.  Better to get benefit from all of the inbound links.

Best solution is to redirect visitors to one or the other.  For me, it's easier to strip out the 'www' and try and force it.  You can do that with the following code added to your .htaccess file within root:

RewriteEngine On 
RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
The domain.com bit needs to be replaced with the correct domain for your site of course.  And you may already have the first line in your .htaccess file.

It would be easier (and require less server load) to make this change within the Apache configuration files but not everybody has access to the root files on a server.

Of course now we'll have to deal with the no-www and yes-www crowds.

ShareThis

Please consider using the ShareThis option if you've enjoyed what I've written. If you click on the link below, a popup will appear giving you options to pass along the content to others. Options include notifing a networking or bookmarking site, sending an email with a link to this article, or even posting about this article on your own website or blog.

0 TrackBacks

Listed below are links to blogs that reference this entry: Remove the www from URLs.

TrackBack URL for this entry: http://drmikessteakdinner.com/cgi-bin/mt/mt-tb.cgi/1326

Leave a comment

Please feel free to leave a comment. Please note that we do have a comment policy and we do ask that you respect it.

Subscribe to Dr. Mike's Steak Dinner

subscribe to my rss feed

Subscribe to Dr. Mike via RSS

Or, subscribe via email:

Enter your email address:

Delivered by FeedBurner

Also subscribe to the Comment Feed

Dr. Mike Sponsors

About this Entry

This page contains a single entry by Dr. Mike published on September 28, 2009 8:39 AM.

Organize Your Books With LibraryThing was the previous entry in this blog.

Getting Paid to Ring the Bell is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

March 2010

Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31