2

I have a weird issue and I still don't know why.

I'm working on a website using Django 1.10. Default language is English and it is translated in French and Portuguese.

The pseudo code of the index.html looks like this :

<html lang="{{ LANGUAGE_CODE }}">
    <head>
       <meta charset="utf-8">
          <title>{% trans "Some title"%}</title>
          <link rel="alternate" href="http://www.example.com/en/" hreflang="en"/>
          <link rel="alternate" href="http://www.example.com/fr/" hreflang="fr"/>
          <link rel="alternate" href="http://www.example.com/pt/" hreflang="pt"/>
<meta name="description" content="{% trans "Some text" %}">

All translations work when I'm on the page, however, when I search my website on google, title and metadescription are in English for the French version (the URL is the right one and redirects to the French site however). Everything works fine for the Portuguese version.

I'm quite confused about that, has anyone a clue ? Thanks

  • The redirects may be the problem. You should link the hreflong URL to the final URL (the French site) rather than to a redirecting URL. – Stephen Ostermiller Aug 10 '17 at 10:02

Your Answer

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

Browse other questions tagged or ask your own question.