say something

Benefits of Removing ‘www’ From Your URL

Although I’m sure many of us don’t pay attention to the SEO of our sites because we just like to write and get on with life, there are a couple of quick fixes you can do to your site that will go a long way in helping you out in the Search Engine rankings. As much as we’d like to think all the Search Engines have their stuff together, they really don’t. One of the most non-sensical things is how they handle www. vs. non-www domains.

You work hard to get your site placed highly in the search engines. However, you find that different search terms use different pages on your site depending on how people link to you. Some may prefer to use the “www” while others will leave it off. You shouldn’t have to worry whether your www. domain has a higher ranking than your non-www. domain.

The problem is that the search engines see these as two different domains. If you are using Apache and have access to .htaccess files the best thing to do is redirect all your urls to either use “www” or not. I prefer not. Besides, www. is deprecated.

Here is the code I use:


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

With this code all of my pages and PR go to one domain instead of being split. If you are doing this to a new site that has yet to be indexed you are fine. If you are going to do this with an existing site then expect a tiny fluctuation as the search engines adjust. Is this really necessary? Probably not as Search Engines continue to improve, but it’s such a quick fix that there really is no reason not to do this.

If you missed it make sure to checkout yesterday’s discussion on redirects and third party services.

UPDATE: Both John Gruber and Mike West have much more thorough articles than the one I wrote along with some additional tips so I suggest you give them a read as well.

Comment with Your Facebook Account

36 people says things!

  1. I’d have to agree with you there Scrivs. On a couple of recent projects I’ve had to purchase the same domain on several tlds for future expansion. In this case, it was easier to add a seperate VirtualHost to take care of the redirecting, ie:

    ServerName http://www.myurl.com
    ServerAlias myurl.co.uk http://www.myurl.co.uk
    ServerAlias myurl.de http://www.myurl.de

    RewriteEngine On
    RewriteRule ^/(.*)$ http://myurl.com/$1 [R=301,L]

    By Dave Cardwell on May 21, 2006 12:44 pm

  2. There is actually a campaign for deprecating www.

    By Joe Lencioni on May 21, 2006 1:00 pm

  3. In which I linked to in the entry ;-). You probably already visited the site so the grey color I use for visited links didn’t really bring your attention to it. I should probably get on that.

    By Scrivs on May 21, 2006 1:03 pm

  4. Ah, i see it now. hehe. Very subtle.

    By Joe Lencioni on May 21, 2006 1:09 pm

  5. [...] Paul Scrivens writes, “Benefits of Removing ‘www’ From Your URL.” I have been contemplating doing this myself. [...]

    By Benefits of Removing ‘www’ From Your URL on May 21, 2006 1:14 pm

  6. John Gruber posted a quite detailed article on this recently that would probably be useful for those unfamiliar with the syntax. Additionally, I posted an article that details other uses of `mod_rewrite` that I make use of to gain some additional measure of control over incoming links from search engines and elsewhere.

    By Mike West on May 21, 2006 1:18 pm

  7. Not to start a flaming www. or no-www. war, but how is it deprecated? Your article is geered towards consistency, not www. or no-www. And if it is deprecated, why are major search engines like Yahoo! and Google insist on putting http://www.?

    By Tom on May 21, 2006 1:20 pm

  8. Well I’m just saying it’s deprecated based on that website. You are right my entry is just about consistency. You would have to read the no-www site for details as to why they feel its deprecated.

    As to why SEs still use it, you would have to ask them :-).

    By Scrivs on May 21, 2006 1:23 pm

  9. And I just finally stopped typing http:// before everything. Super. No wonder I have arthritis.

    OT: I’ve noted a definitive increase in the amount of content you’re publishing as of late. Just wanted to mention that it didn’t go without notice. Nice to see, and always nice to read.

    By Rick Turoczy on May 21, 2006 1:25 pm

  10. Rick: This is just the beginning…

    By Scrivs on May 21, 2006 1:38 pm

  11. Alright. You’ve done it. I’m convinced and have added the rewrite rules to my .htaccess. Thanks for the post. Gave me that extra push I was waiting for ;-)

    By Brian Benzinger on May 21, 2006 1:58 pm

  12. Yeah, now how about you push me to write novels on my site like you do on your’s? Fair is fair right?

    By Scrivs on May 21, 2006 2:04 pm

  13. Haha. Well, since you asked…

    *push*

    Now. I’d better see some novels here or I’d be pretty upset! Haha, just playing. You’ve been on a role here lately and I’m loving it. Keep it up!

    By Brian Benzinger on May 21, 2006 2:15 pm

  14. Some are in the works, but maybe they won’t seem as long as your’s because I don’t use “www” in my urls so basically you have the upperhand.

    By Scrivs on May 21, 2006 2:23 pm

  15. Scrivs: Glad to hear it, and looking forward to it. Keeps me thinking.

    By Rick Turoczy on May 21, 2006 2:42 pm

  16. Well, thanks for the article Scrivs, I needed that extra push to actually go about changing my .htaccess file. Was thinking about doing this for a few weeks now, so thanks again, and keep it up with the newly frequent posting times!

    By Joshua Blount on May 21, 2006 3:15 pm

  17. The thing I never got about the whole www-or-not/one-or-the-other-thing is that these redirects don’t change the links on other sites. Can someone explain how this benefits your site’s standing with search engines?

    By Shaun Inman on May 21, 2006 3:44 pm

  18. At least back in the day Google would give two seperate PRs to www and non-www urls. For example, cssvault.com had a PR 7 while http://www.cssvault.com had a PR 6 therefore when you type in a search query depending on how the SE worked you might get two different results when I would rather have all my PR juice focused on one url.

    The permanent redirect lets the SEs know that even when an external site links to cssvault.com with http://www.cssvault.com that the link should be read as cssvault.com and therefore passes the juice onto that url. Hope that makes some sense.

    By Scrivs on May 21, 2006 3:49 pm

  19. “As to why SEs still use it, you would have to ask them”

    They do that because http://www.domain.com and domain.com are two completely different websites.

    Just because you’re used to http://www.domain.com and domain.com giving you the same website, which is what 99% of the Web does, doesn’t mean they are.

    In most cases, the http://www.-version is simply a symlink (symbolic link, think of it as a shortcut) to the actual site, which sits in the “domain.com” directory. However, you can just as easily have “www.domain.com” be a directory containing a completely different site, which actually happens on some domains.

    I once came across two different companies sharing the same domain — one company was at foo.nl, the other at http://www.foo.nl (I forgot the actual URL). To make things even worse, they were in the same branch.

    However, because that sitaution exists in more places on the web, search engines will have to continue seeing the two as two separate websites. After all, “www” is nothing more than a subdomain. Just as how “bowling.avalonstar.com” is a completely different site from avalonstar.com or http://www.avalonstar.com, “bowling” is a subdomain no different from “www”.

    …am I getting too technical here? ;-)

    By Faruk AteÅŸ on May 21, 2006 6:41 pm

  20. well the “www” portion is just a subdomain like any other. If you operate a dedicated server within a domain it makes perfect sense to assign it a “www” subdomain as that is the type of traffic it generally handles in a schema that extends to mail.domain.tld, news.domain.tld.

    By WD Milner on May 21, 2006 8:56 pm

  21. I actually had an article about this on my Web site awhile back but due to politics it was taken down. You’ll notice the difference between minor variations in your URLs is much deeper than just www and non-www. I would consider the best practice is to use www simply because typing in “ronniesan” in the address bar then hitting ctrl (cmd) + enter in a browser will automatically add the www. and the .com to the URL. Any type of 301 permanent redirect is the best way to handle this issue. There are also differences between capitalizations in URLs according to some search engines. You can learn more about the tiny differences by doing various searches with variations in your search terms or by checking the backword links in your different pages.

    By RonnieSan on May 22, 2006 12:13 am

  22. While at the topic your comment-section is acting only on the deprecated? www.

    Compare:

    http://www.getfirefox.com
    getfirefox.com

    By alexander on May 22, 2006 4:54 am

  23. Two minor points:
    - the second line is better written as:
    RewriteCond %{HTTP_HOST} !^wisdump\.com$ [NC]
    (note the slash on the period) because a period has a meaning in the ‘regular expression’ you are creating – but it mostly seems to work anyway :)
    - I have the damndest time getting wordpress to play correctly with a non-www address :(

    By Lea on May 22, 2006 6:24 am

  24. RE:RonnieSan
    I would agree with you, and was thinking about the same thing (even in other browsers).

    On all of my sites I have this set to shoot them to www. no matter what. As the above mentioned article mentions, it keeps things neat and tidy in our analytics. Also, for pages that we have several entry points to – I will use 301 to let the Search Engines know that it has been permanently moved to the new URL. I work for a book publisher and this allows us to have a book detail entry point on the ISBN or SEF Book Title that we use internally on our site.

    Anyway, no matter what – I have the domains (we have about 15+) point to the www. versus non www. (Especially since that is how it is printed on all of our books).

    Good articles!

    Peace,
    Nate

    By Nate K on May 22, 2006 9:25 am

  25. [...] I have written before that I hate www. It turns out I am not alone. Hate is such a strong word though. A much better way to say it is www is deprecated [via wisdump.com] [...]

    By Quit Typing WWW at Jackson Miller on May 24, 2006 12:48 am

  26. This is all good and well except that when I type http://www.wisdump.com into my address bar I get a page saying:

    This is the Pleskâ„¢ default page
    If you see this page it means:
    1) hosting for this domain is not configured
    or
    2) there’s no such domain registered in Plesk.
    For more information please contact Administrator.

    By Matt on May 24, 2006 4:24 am

  27. Yeah I just moved servers so I am working on that.

    By Scrivs on May 24, 2006 4:29 am

  28. All better, just had to change a setting serverside.

    By Scrivs on May 24, 2006 4:37 am

  29. [...] From the day this site went online it’s removed the WWW if used, providing a single, optimized URL for all pages. Now that methods to implement such functionality are becoming so simple, I expect it will become even more common as bloggers adopt a single URL model (hopefully the non-WWW form). [...]

    By Adam Caudill’s Blog » Demise of The WWW on June 17, 2006 1:56 pm

  30. Hi, I am creating a web site http://www.mysite.com. Now there I am using wildcards so that my users can use it by their name such as typing myname.mysite.com (e.g. http://john.mysite.com). Now on the first page I am extracting the user name searching in the database it exists or not. If yes then redirecting that to with his page and if that does not exist then i want to redirect that to http://www.mysite.com. Now as i have written code in the first page so it has become recursive. Can you suggest how to solve it. Will DNS forwarding can help me here.

    By Sumantra on June 30, 2006 2:11 am

  31. I just wanted to thank you for this, Gruber’s code broke WordPress when I tried it. I happily stumbled across this after reading Gruber’s post and found that your method is WP friendly.

    Thanks.

    By Nathaniel Nutter on July 3, 2006 5:04 pm

  32. Are you all crazy?

    Obviously this is what you get when you something becomes popular. Back to basics, the “com”, “net”, “org” at the end of a DOMAINNAME is call the root domain. The Next part is what you rent from Domain name authorities. That is considered the domain. The next element in a properly format URL is the host name. In this case the “WWW”. That is how DNS works. Hate to shock you all but we use to use “gopher”, “news”, “mail”, and a whole bunch more standard names for host all over our networks which were primarily dedicated to those tasks. Amazing how that works, HUH? Imagine we actually use to do things right back in the beginning before some lazy Late comers decided the Internet was here to server the solely the web….

    Just because some people are lazy, and DNS administrators feel they need to cater to these people, does not mean any professional person who claims to be a “web developer”, “web designer” or any other designation with web or Internet centric names should show their lack of professionalism, experience, and grasp of the most basic technology of what makes the Internet, by pushing or endorsing something that is nothing more than a hack. If anything you should be pushing to put the www back into the domain names, because that is the proper use of DNS. You are equating web service with the domain name, not with a host or service aliase designation, as it should be.

    If you are going to developed on the Internet at least take the time to understand the Internet. There were things before the web browser, the Internet was not and is not only there for html and WWW. By original design, there should not be a machine or record for the base domain name. It is just their as network classification, not a machine classification. Everything should be A host record under a domain name, or an aliases to another host record.

    By george on August 4, 2006 9:00 am

  33. Even I don’t have a “WWW”. To be frank, I never noticed it until recently though I have been blogging for over 8 months now.

    Getting this code on my .htaccess and work with WP is a big headache. After reading this article, I’m happy. :D

    I still don’t get what’s right. Should I do something to get the “www” redirect on or leave it as it is?

    By Ashwin on September 3, 2006 2:12 pm

  34. [...] I was recently cleaning up my RSS reader when I came across this article by Scrivs on the benifits of removing the www from your url from a few months ago. The idea that the http://no-www.org/ has been arround for a while (since at least 2003), but I don’t totally agree. [...]

    By On UX » Blog Archive » Usability of the ‘www’ in a URL on October 5, 2006 9:11 am

  35. [...] Many thanks to Paul Scrivs of Wisdump and 9rules for his recent article outlining the reasons for removing the www from your site. [...]

    By Inseasonout : Making things beautiful » Blog Archive » Taking the WWW out of the web on October 31, 2006 7:28 am

  36. [...] wisdump.com/webmastering/benefits-of-removing-www-from-your-url/ [...]

    By Baney Design: Websites & Branding » Blog Archive » Trouble with 3 Letters on December 20, 2008 7:28 am

  37. Subscribe to comments via RSS!

    What do you think?

/* */