Do you know if I should use <link rel="canonical" tag, or 301 redirect from:

http://example.com to http://www.example.com

...to avoid a duplicate content penalty in case other pages link to the domain without the www subdomain? Or is Google smart enough now to identify which is the canonical one?

3 Answers 3


If you don't specifically tell Google your preference you will probably have duplicate content issues. There is more then one way to inform Google of your preferred domain:

  1. Do a 301 redirect to use the 'www' or no 'www'
  2. Specify your preferred domain in Google Webmaster Tools
  3. Use canonical URLs (although it isn't typically used in this situation)
  • 4
    I'd choose solution (1) ;) Nov 19, 2011 at 16:20

The duplicate content penalty is a myth. There is no penalty. Read more:

The myth of the duplicate content penalty - Search Engine Land

The truth is that Google is very good at automatically filtering out duplicate content, so if you have two pages that are exactly the same, Google will realize that they are the same page and just choose one of them to index. This will not negatively affect you in any way. If you want to choose which specific url you want the page indexed at, do as John mentioned in his answer - use a canonical tag or 301 redirect that indicates the URL that you want indexed.

When people talk about the mythical "duplicate content penalty", they are usually talking about spammy, repetitive content that is automatically generated or plagiarized from external websites. If your website contains valuable content that isn't plagiarized, then you don't have to worry about any "duplicate content" penalty.


John's answer is spot on however if your looking for advice which one is technically the best then the actual the answer is all 3 options.

SOURCE: Pro Webmasters Answer from John Conde

  1. Do a 301 redirect to use the 'www' or no 'www'
  2. Specify your preferred domain in Google Webmaster Tool
  3. Use canonical URLs (although it isn't typically used in this situation

And here's why...

Why 301 redirect URLs:

When you force users to use either www or non-www and they decide to reward your site with a backlink the next user who clicks that link does not need to go through a redirect.

While redirects nowadays are near instant they are additional server-side request that can be reduced if you have users linking to you correctly, which should be considered a good practice, especially if your site receives high volume of traffic.

Why canonical URLs

Nowadays it is considered a best practice to use canonical links, this is because duplicate content can appear in many different forms without factoring www and non-www. Blogs particularly will operate with pages being accessible via many different URLS for example:

  • /date/
  • /tag/
  • /author/

Using Canonical links correctly will insure that your content however it may be accessed is never marked as duplicate.

Why preferred domain in Google Console

It is a good practice to add all variations to Google Webmaster Tools so that you can confirm at any point that your site or Google is not doing anything it shouldn't be.

  • NON-SSL sites will have 2 variations
  • SSL sites will have 4 variations

You should seem something similar to this:

bybe multiple sites in webmaster tools
(source: bybe.net)

Adding a preferred domain in the process takes no more than a few seconds but in additional to 301 and canonicals this option is a great fallback just in case for some reason your 301's or canonical links stop working for one reason or more.

  • 2
    "301 redirects result in around a 15% loss of PageRank" is untrue. Matt Cutts said he made that up because somebody suggested that they redirect rather than use links. See Google: PageRank Dilution Through A 301 Redirect Is A Myth and then Google: There is no PageRank dilution when using 301, 302, or 30x redirects anymore Oct 31, 2016 at 18:18
  • I believe that Matt Cutts was referring the the "pagerank damping factor" (See en.wikipedia.org/wiki/PageRank) when referring to the 15%. He either believed that it applied to during redirects, or said it did because it helped make his case not to do something shady. Google has now said redirecting URLs do not have the damping factor applied to them (even if they did at some point.) Oct 31, 2016 at 18:23
  • Good find, since I'm unable to back that up with fact I've removed it from the answer. I do however believe this is untrue, it would be fair to say a lot of what Google tells us is disinformation, Matt Cutts and John.M response is to Gary's tweet was purposely vague to say the least. Oct 31, 2016 at 20:38
  • "...reward your site with a backlink the next user who clicks that link does need to go through a redirect." - Although if you have the redirect in place then the correct link will most likely have already been copied to create the backlink in the first place, so the "next user" will click the already canonicalised backlink and not need to be redirected.
    – MrWhite
    Nov 1, 2016 at 9:06
  • Suppose say DOES NOT need to go through a redirect, that was the benefit of enforcing urls. Nov 1, 2016 at 10:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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