Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Canonical url and localization

In my application I have localized urls that look something like this:

  • http://examle.com/en/animals/elephant
  • http://examle.com/nl/dieren/olifant
  • http://examle.com/de/tiere/elefant

This question is mainly for Facebook Likes, but I guess I will hit similar problems when I start thinking about search engine crawlers.

What kind of url would you expect as canonical url? I don't want to use the exact english url, because I want that people clicking the link will be forwarded to their own language (browser setting/dependent on IP).

The IP lookup is not something that I want to do on every page hit. Besides that I would need to incorporate more 'state' in my application, because I have to check wether a user has already been forwarded to his own locale, or is browsing the english version on purpose.

I guess it will going to be something like:

http://example.com/something/animals/elephant

or maybe without any language identifier at all:

http://example.com/animals/elephant

but that is a bit harder to implement, bigger chance on url clashes in the future (in the rare case I would get a category called en or de).

Summary

What kind of url would you expect as canonical url? Is there already a standard set for this?

like image 793
Dirk Boer Avatar asked Jan 24 '14 08:01

Dirk Boer


1 Answers

I know this question is a bit old, but I was facing the same issue. I found this:

Different language versions of a single page are considered duplicates only if the main content is in the same language (that is, if only the header, footer, and other non-critical text is translated, but the body remains the same, then the pages are considered to be duplicates).

That can be found here: https://developers.google.com/search/docs/advanced/crawling/consolidate-duplicate-urls

From this I can conclude that we should add locales to canonicals.

like image 79
Molimat Avatar answered Oct 17 '22 11:10

Molimat