Possible Duplicate:
www and non www can suffer duplicated content

When I go for any website review the first point I get from the reviewers is both of my www and non www domains should point to one of them, otherwise this will lead to duplicate content. But my thinking is search engines should be smart enough to understand that and should consider it as one page not as duplicate. For example in Google webmaster tools we can set the preferred domain name.

Please let me know whether it is really an issue in SEO point of view.


3 Answers 3


I just tested this with current websites: go to some big domain name's home page (for example Amazon, Yahoo, Google, Carphone Warehouse, AT & T etc). Add the www and then try to remove it and see what happens. OK, in the example of Yahoo and Google, it changes as it's detected the language but, this still forces it to not duplicate content.

However, there are still plenty of websites which have both www and no subdomain. It is my opinion, Google will just ignore one and will not penalize things like this because having a site with www and without is quite 'standard' (and the majority of shared hosting providers set this up as standard).

So, to answer your question, I think Google is smart enough to ignore it and index just one of the pages (although which one - the one with www or without is up to Google)... However, since some of the 'big boys' are ensuring this doesn't occur I'd think I would their advice, put the work in and ensure that you have only 1 URL per page / content.

  • 1
    Here's a link to back up that Google will ignore it, if you set the preferred domain in webmaster tools: support.google.com/webmasters/bin/…. However as Su' says - how do you tell all the other search engines? Commented Jul 19, 2012 at 11:18
  • I don't think this should be done within webmaster tools (in fact, I don't believe these should be used at all (or at least relied on) as management becomes difficult with different search engines etc. So, I would do it with code. Either not use a subdomain at all, or have it as a forwarder to the home page or do something like Vince's suggestion
    – Dave
    Commented Jul 19, 2012 at 11:21
  • 1
    I say that because you say "Google is smart enough...". In fact it chooses not to be smart, unless you tell it to. Commented Jul 19, 2012 at 11:24
  • OK, + 1 for "Google tries not to be smart" as I'm a big believer in that too - however, I don't think it has a choice in this case simply because nearly all shared hosting sites I've used in the past 10 years always set up both subdomains (empty and www) as default - this means both can be index and have been so Google (IMO) must have written a rule to cope with this
    – Dave
    Commented Jul 19, 2012 at 11:27
  • "Google will just ignore one". If you don't set a preferred domain or setup a 301 redirect then Google will see the www and non-www pages as duplicate content and will therefore decide to index one or the other. You should not get penalised because, as you suggest, this is common on the web and Google should detect you are not trying to game the system. But you're making Google work harder. And has been mentioned, this is only Google. Google: "...use a 301 redirect to redirect traffic from your non-preferred domain, so that other search engines and visitors know which version you prefer."
    – MrWhite
    Commented Jul 19, 2012 at 11:34

It's not required, but will probably make your life and SEO a bit better, plus it takes very little to do it–see @VincePettit's answer–so isn't really worth fighting.

[M]y thinking is search engines should be smart enough to understand that and should consider it as one page not as duplicate.

That's an opinion. The reality is that www.example.com and example.com only show the same content because you've told them to and it's basically standard practice. This isn't a failing on the search engines' part; the two URLs are actually separate things. If you poke around in your DNS settings, you can delete the www sub-domain so that it doesn't work at all, for example. There's also nothing stopping you from putting up entirely unrelated web sites at the two addresses. (Obviously that's probably not a great idea, but we're talking technical details here, not practicality. For an unrelated but similarly low-level sort of question, see this prior thread. You might also find What does WWW do? interesting.)

So, the fact that you happen to have exactly the same thing at both of those locations right now is basically meaningless. (Again, at the technical level.) Overall, it's better and easier for everyone all around if you take the time to specify which is canonical, by redirecting or whatever, than expecting the engines to constantly index both(or more) versions and then compare them on their end to make sure they're still identical from the last time they were looked at.

For example in Google webmaster tools we can set the preferred domain name.

That's nice for Google. Now go around and do it for every other search engine, assuming they offer you the ability to. Or wouldn't it again be easier if you just do it on your end before they become confused about it in the first place?


The main thing to make sure you have is a canonical link for pages, this makes sure that the search engine knows the URL it should be indexing and won't try to index both the non-www and www versions.

It's an easy solution to implement a redirect from non-www to www so from my own personal point of view it's something I always implement on sites.

All you will need to do is add the code below to your .htaccess and replace the domain names with your relevant URL and it will redirect non-www to www.

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^foo.co.uk [NC]
RewriteRule ^(.*)$ http://www.foo.co.uk/$1 [L,R=301]

Not the answer you're looking for? Browse other questions tagged or ask your own question.