SEO preference: does a site with WWW rank better than without WWW?

12,670

Solution 1

For SEO ranking purposes there is no difference between www and non-www. The www is just a subdomain of the main domain and Google considers subdomains and sub-directories equal (i.e. part of the same website, not special in any way).

You do need to pick one versus the other, though, as using both will cause you SEO problems. Since www.domain.com is a different URL then domain.com you can run into duplicate content penalties since you can pull the same information up using two URLs. To solve this:

1) Set up your web server to always forward either to the www domain or without it. This should be a 301 redirect. In Apache it would look like this:

Forward to the www

RewriteEngine On
RewriteCond %{HTTP_HOST} !^(www\.|$) [NC]
RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Forward to the non-www

RewriteEngine On 
RewriteCond %{HTTP_HOST} ^(www\.|$) [NC]
RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

2) Make sure all of your internal links use the chosen form (even though the 301 redirect will catch this for you internal links do pass PR and help your rankings and 301 redirects dilute their value).

3) In Google Webmaster Tools tell Google to always use the www or not. It's under site configurations / settings.

The preferred domain is the one that you would like used to index your site's pages. If you specify your preferred domain as http://www.example.com and we find a link to your site that is formatted as http://example.com , we'll treat that link as if it was http://www.example.com . In addition, we'll take your preference into account when displaying URLs in our search results. It may take some time for changes to be reflected in our index.

4) You may want to consider use rel=canonical tags on your pages to make sure the search engines always know which chosen form is the right one but this is redundant since the 301 redirect should prevent them from seeing the other form.

Solution 2

I'm not an expert, but this is what I've found to happen. If you had www links and you 'cleaned' up then you will suffer a de-ranking while Google and friends reindex the site. Furthermore, people say that there's no difference between www or non-www domains, but they fail to include/realize how cookies are affected by the domain. If you have a non-www then any cookies assigned from it are available to any possible subdomain of the site. That can lead to a security leak.

Keep that in mind, but ultimately a subdomain is to separate your concerns. Cookies for example are automatically constrained to the subdomain and your security concerns should be reduced as far as that part of a website is concerned. In the end www is nothing more han a subdomain.

Also, users by nature will most likely type in www anyway.

I personally configure my websites into www setups to begin with, and I'm happy with it.

Update

I think I failed to fully answer. Www or non-www will have 0 effect on your website, BUT if you start screwing around with it after the site is deployed and potentially indexed, you're asking for trouble. Choose one setup and srick with it and it will make your life easier.

Share:
12,670

Related videos on Youtube

Såm
Author by

Såm

Hello, I an architect from The Netherlands. I love drawing, cooking, fire and playing around discovering new stuff. My knowledge of programming is limited to the interaction that we as humans undergo in this rapidly digitalising world. I recently found out that programming techniques are also helpful in realworld architecture/urbanism. Like designing a public park that interact with human! The unique outcomes of such crazy projects is what triggers me! Contact me if you have a crazy project and need a refreshing concept! +31(zero) six four four seven seven seven seven zero zero ;) Sammy

Updated on September 18, 2022

Comments

  • Såm
    Såm over 1 year

    After having read various articles on this site about WWW or Non-WWW website setup, here, here and here, and after having setup a correct redirection rule in .Htaccess to at least eliminate duplicate contents (currently the non-www solution (e.g. http://example.com) I have a feeling that my site rank less since I changed this.

    My confusion was strengthened by these two opponents:

    http://no-www.org & http://www.yes-www.org

    Could the change of www.example.com >> http://example.com have a factual impact on ranking? Google does not explicitly say either is better or worse. Are they holding information back?

    I am confused fellow folks...

    As much as I would like to separate facts from fiction, I am aware that not all the good valid information is written. Not on google webmaster site and perhaps not elsewhere. If so it seems out of date!

    Does or does not a WWW domain impact SEO/rank better than its NON-WWW version?
    (Given that you have setup a proper redirect to avoid duplicates and go with one)

  • m_pGladiator
    m_pGladiator about 13 years
    Fantastic answer John! I would add that if you're doing this to an existing site with existing back-links to both the 'www' and 'no-www' versions, then adding this canonicalization redirect may have an initial impact (albiet slightly) due to the 301 decay factor. I wouldn't expect to see this normally impact an average site - but we have seen the impact when done to 10k-100k+ page sites.
  • John Conde
    John Conde about 13 years
    @mike, That's good to know. I always prefer empirical evidence to speculation.
  • Såm
    Såm about 13 years
    thats one Timelessly Elaborated Answer! +1
  • Bonk
    Bonk over 7 years
    To add to @MikeHudson comment: I'd recommend performing a backlink analysis to find out which of the two versions has a stronger backlink profile and choose that one to be your preferred domain.