General steps to be taken while optimizing websites with many regional versions -
In case your regional site have –
You should choose to use rel="alternate" hreflang="x".
Note - This option should not be used if the website has entirely different content for each regional version of the website.
Serving correct language URL to searchers -
Suppose you have created a profile in a Spanish version of a forum, which has many regional versions, such as French, English etc. and your profile gets translated to all versions, translating only the navigation etc. and keeping the main content in same Spanish language. Situation is, your canonical URL is something like –
http://es.forumname.com/profilename
And non-canonical URLs are –
http://en.forumname.com/profilename
http://fr.forumname.com/profilename
It has 2 step solution.
Step 1 – Picking the canonical URL
Step 2 – Using rel="alternate" hreflang="x"
Step 1 – Picking the canonical URL –
Method 1 – Set a cookie to record user's preference and 301 redirect non canonical URL to canonical URL Thus when a user whose language preference has been recorded as French opens http://fr.forumname.com/profilename, he/she will be redirected to the canonical URL i.e. http://es.forumname.com/profilename however the same will rendered in French because of language preference set in cookie.
Method 2 – Using rel=”canonical” Implement this tag on each non-canonical URL.
Step 2 – Using rel="alternate" hreflang="x" –
This code is placed on canonical URL page template, repeatedly for each non canonical page i.e. the following code will be placed in HTML of http://es.forumname.com/profilename -
<link rel="alternate" hreflang="fr" href="http://fr.forumname.com/profilename">
<link rel="alternate" hreflang="en" href="http://en.forumname.com/profilename">
In case there are numerous regional version, then instead of hard coding the rel="alternate" tag, it can also be coded, to dynamically choose the preferred language to be shown in hreflang attribute and the respective non canonical URL to be shown in href attribute. If you choose the dynamic method via coding, it is advisable to go by method 1 in step 1.
Written by SynapseInteractive Copywriting Team.