1

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):

example.com/category1/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

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. – Stephen Ostermiller Apr 2 '18 at 13:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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