Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two pages with same content and same meta title and meta description. They also have very simular URL:

  1. http://www.mysite.com/new-york
  2. http://www.mysite.com/new_york

I need first link to be "official".

To avoid having duplicated pages, I want to add canonical meta tag in header but on which page? Does it have to be on both of them or only on second? On first?

Can you give me some advice please?

share|improve this question
Surely it would prove more beneficial to just resolve the issue that is causing the second URL instance to be created? – zigojacko Nov 12 '13 at 9:25
If they're exactly the same, why does the second one even exist? It might be better to make the non-canonical URL a redirect to the correct one instead. – Olly Hodgson Nov 12 '13 at 9:58

You should normally always opt to use dash vs underscores in URL's due to the fact that Google treats dash as a true word separator, through technically Google can make sense of both.

Matt Cutts explains the difference between how Google interprets underscores and dashes in a URL.

share|improve this answer

From Google Support…

Add a rel="canonical" link to the section of the NON-canonical version of each HTML page.

Find that, and more here…


share|improve this answer

<link rel="canonical" href="http://www.mysite.com/new-york> Copy this link into the <head> section of the page www.mysite.com/new_york . Adding this link and attribute let you to suggest to Google: "Of all the two pages with identical content, this page is the most useful. Please prioritize it in search results."

share|improve this answer

Just on one of the pages. I would add to the second one as using a dash (-) seems "cleaner" perhaps.

share|improve this answer

You need to add it to the /new_york page:

<link rel="canonical" href="http://example.com/new-york" />

You may add it to the canonical page /new-york itself, too (in addition, that is!). From the RFC 6596: "The Canonical Link Relation":

The target (canonical) IRI MAY:
o Be self-referential (context IRI identical to target IRI).

If you don’t need the duplicate page/URL: instead of using rel-canonical, it would be better to 301-redirect /new_york to /new-york.

share|improve this answer
Not if you still need the other page. This is specially valid when browsing category or product pages as explained right in the begining of this article - support.google.com/webmasters/answer/139394?hl=en – riseagainst Nov 12 '13 at 14:23
@guisasso: True; clarified it in my answer. – unor Nov 12 '13 at 14:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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