0

I'm adding localization support for GoogleBot crawling to a page that already uses the default cookie approach of ASP.net Core to determine language.

The expectation is that the new system will support both the old cookie method and using the new urls. So, there will exist URLs that look like this, all pointing to exactly the same content in different languages (for example, English and French)

https:// host.com/en/Controller/Action

https:// host.com/fr/Controller/Action

https:// host.com/Controller/Action (here, we fallback to the cookie value to determine the language)

All page links will point to URLs with the currently displayed language (so https:// host.com/Controller/Action might have a link to /en/Controller/Action2 if the page is displayed in English, or fr/Controller/Action2, but not to /Controller/Action2). Essentially, the objective is to abandon the unspecified URLs as soon as possible, but to support old bookmarks that users might have where the language code didn't exist.

My question: With these 3 URLs, which should I map as being rel=canonical? Does GoogleBot even care which of these is the "canonical" one so long as all of them accurately point to the canonical link?

Here, Google states that the canonical url should be used

To specify which URL that you want people to see in search results

I would like the displayed URL in search results to reflect the language users are using (as ideally, French users will see a French meta description with an "fr" link, English users will see the English meta description with an "en" link).

0

What you need to implement is HREFLANG tags, which are a special type of canonicals created specifically to deal with having duplicate content in different languages.

This guide from Google is a good way to learn more about HREFLANG and should teach you the basics but pay attention because it can get very confusing, very fast.

| improve this answer | |

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.