I have the following scenario with items within different categories:

  • catagory1 has the URL example.com/category1
  • category2 has the URL example.com/category2
  • [...]
  • all example.com/all to show posts of all categories

Every item get's the following permalink (category name/item slug):


To not lose context when I come from the all category the permalinks are example.com/all/item-slug

Is it possible to tell google with a meta tag or something like that that the real URL for this page is example.com/category1/item-slug, so that it indexes the better URL and not the one with all. I'm also worried about duplicate content being introduced by this.

1 Answer 1


When you have multiple pages of the same content, you're supposed to use the canonical tag.

On the page site.url/all/item-slug, you should have

<link rel="canonical" href="http://example.com/category1/item-slug" />

Put the above code in your <head> tag and it will tell Google that you want the other URL to be indexed instead of the current page.

  • I updated the URL in the href to be fully qualified (with the http://). It wouldn't have worked the way you had it without that. Commented Apr 2, 2018 at 13:47

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.