Is it time to get rid of the extra “www.” for your websites? Of course, you need to support users putting in www.foobar.com or foobar.com, but should you just let it work, or should you redirect over to foobar.com (slashdot.org seemed to do this on day one, and it was the first time that I noticed it).
I have been doing this for many years with many of my sites:
<VirtualHost *:80> ServerName www.foobar.com Redirect permanent / http://foobar.com/ </VirtualHost>
Can this help with search-engines and duplicate content? Is it just a cleaner look?
I prefer it, and wish that my browsers that take “foo” to “http://www.foo.com” would first try just foo.com.
June 20th, 2006 at 6:36 am
In Opera that’s something you can configure. ;)
June 20th, 2006 at 7:08 am
I have had difficulties with using my bare domain name where my web server is not at the same address as my mail server. Some SMTP clients (rightly or wrongly – I am not clear from the RFC) use the bare domain name as the mail server if they fail through MX lookups. The result has meant for me that I have to run Apache on my mail server as well with mod_rewrite so any bare domain name http attempts get redirected back to the right place.
June 20th, 2006 at 10:46 am
I think it’s long overdue. The www is extraneous and as long as you have a redirect in there you’re good. I’m always surprised to find some sites letting me visit with or without a www or via .org, .net, etc… without redirecting me which is terrible for SEO in terms of inbound linking consistency and duplicate content.
I generally put the redirects under the one virtual host entry for the domain using a serveralias and redirect but the effect is the same. I also re-append the request to the redirect in-case someone has memorized a URL and types it in with a www on the front:
<VirtualHost *>
ServerName domain.com
ServerAlias http://www.domain.com
DocumentRoot /var/www/domain
RewriteEngine on
RewriteCond %{HTTP_HOST} ^.*\.domain\.com
RewriteRule ^(.*)$ http://domain.com$1 [R=301,L]
</VirtualHost>
June 20th, 2006 at 2:46 pm
Agreed! www is so late 90’s!
June 27th, 2006 at 12:53 pm
Just happened across this site by accident, and I remembered your post:
http://no-www.org/
June 28th, 2006 at 6:46 am
Agree. Dreamhost actually has an option to do it (in either direction) on their panel. It’s better for search engines as it concentrates your goodness – I’d rather have one high rank than two low ranks! Some search engines also look for general signs of savviness, e.g. do you have a robots.txt, do you have neat URLs. This is one of those signs.
A single domain is key for cookies too.
Trivia: We were doing this for a website in 1997. It was a .com.au, so it was complicated enough and we didn’t want the “www” as well. Only, we found a lot of people at the time couldn’t actually believe it was a legitimate web address without “www”.
December 3rd, 2008 at 10:04 am
ousted allready ass him no dougbt