Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a multilingual and multiregional (using different subdomains) website and I'm not sure how to handle those 3 elements.

To summarize here are the hreflang links that I generate on each page (internal page here):

<link href="http://mywebsite.com/" rel="alternate" hreflang="x-default" title="International" />
<link href="http://uk.mywebsite.com/internal-page" rel="alternate" hreflang="en-GB" title="Internal page">
<link href="http://fr.mywebsite.com/fr/page-interne" rel="alternate" hreflang="fr" title="Page interne">
<link href="http://be.mywebsite.com/fr/page-interne" rel="alternate" hreflang="fr-BE" title="Page interne">
<link href="http://be.mywebsite.com/nl-be/interne-pagina" rel="alternate" hreflang="nl-BE" title="Interne pagina">
<link href="http://nl.mywebsite.com/nl/interne-pagina" rel="alternate" hreflang="nl" title="Interne pagina">
<link href="http://it.mywebsite.com/it/pagina-interna" rel="alternate" hreflang="it" title="Pagina interna">
<link href="http://ch.mywebsite.com/de/internen-seite" rel="alternate" hreflang="de-CH" title="Internen Seite">
<link href="http://ch.mywebsite.com/fr/page-interne" rel="alternate" hreflang="fr-CH" title="Page interne">

Where the default domain (http://mywebsite.com/) isn't a country selector dedicated page (although there is a country-language selector on top of the page). It is in fact our international version of the website that contains only english content.

  1. Are the above links correct? and is the title attribute relevant/useless or wrong?
  2. Canonical tags are absolute links. E.g. in an internal page of Italian domain in italian language. <link rel="canonical" href="http://it.mywebsite.com/it/pagina-interna">
  3. I use XHTML 1.0. What values should I use on xml:lang attributes on the HTML tag?
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted
  1. Your use of hreflang="x-default" isn't correct. As you mentioned your default domain isn't a country selector page and is simply an international page in English, in which case you should just be using the language hreflang= without any location:

    <link href="http://mywebsite.com/" hreflang="en" rel="alternate" />
    

    And this obviously has to match the other equivalent language pages, take care to use the specific equivalent URL, not just the homepage.

    In which case, might some thing lke this be more relevent?

    <link href="http://mywebsite.com/internal-page" hreflang="en" rel="alternate" />
    

    Your use of title= isn't correct, as there is no reference to using this in Google guidelines.

    Your also missing trailing slashes / from the end of the tags.

With these points in mind, this is how your tags should look:

        <link href="http://mywebsite.com/internal-page" hreflang="en" rel="alternate" />
        <link href="http://uk.mywebsite.com/internal-page" rel="alternate" hreflang="en-GB" />
        <link href="http://fr.mywebsite.com/fr/page-interne" rel="alternate" hreflang="fr" />
        <link href="http://be.mywebsite.com/fr/page-interne" rel="alternate" hreflang="fr-BE" />
        <link href="http://be.mywebsite.com/nl-be/interne-pagina" rel="alternate" hreflang="nl-BE" />
        <link href="http://nl.mywebsite.com/nl/interne-pagina" rel="alternate" hreflang="nl" />
        <link href="http://it.mywebsite.com/it/pagina-interna" rel="alternate" hreflang="it" />
        <link href="http://ch.mywebsite.com/de/internen-seite" rel="alternate" hreflang="de-CH" />
        <link href="http://ch.mywebsite.com/fr/page-interne" rel="alternate" hreflang="fr-CH" /">

2. It sounds like you are using the canonicals correctly

Although not incorrect, I think your structure of subdomains and sub folders might be slightly over kill. If the root language of the subdomain is the default, you don't really need another subfolder: e.g:

http://fr.mywebsite.com/fr/page-interne

Could be simplified too (no need for the fr subfolder)

http://fr.mywebsite.com/page-interne
share|improve this answer
    
Thanks for your contribution. Avoiding to close the tag seems ok as I am using text/html, <!DOCTYPE html>. See here. For the title attribute although it is not in google guidelines I think it is correct and adds information. See here Am I wrong? Any idea for the lang attribute in html tag? –  DnBase Jun 20 '13 at 22:08
    
You still need to close it with a trailing slash, just you don't have to use 'link'. Google defined the use 'hreflang="" rel="alternate", so if its not in their guidelines it is not correct and you should not use it. If you still need further clarification you might want to ask in Google's support forums. –  Max Jun 21 '13 at 2:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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