2

My website on Github Pages has 15 different pages for different languages and locales. They all have the following in the head block.

        <link rel="alternate" href="https://359north.com/index.html" hreflang="x-default" />
        <link rel="alternate" href="https://359north.com/index-de.html" hreflang="de" />
        <link rel="alternate" href="https://359north.com/index-fr.html" hreflang="fr" />
        <link rel="alternate" href="https://359north.com/index-es.html" hreflang="es" />
        <link rel="alternate" href="https://359north.com/index-it.html" hreflang="it" />
        <link rel="alternate" href="https://359north.com/index-pl.html" hreflang="pl" />
        <link rel="alternate" href="https://359north.com/index-se.html" hreflang="se" />
        <link rel="alternate" href="https://359north.com/index-ru.html" hreflang="ru" />
        <link rel="alternate" href="https://359north.com/index-ua.html" hreflang="uk" />
        <link rel="alternate" href="https://359north.com/index-in.html" hreflang="in" />
        <link rel="alternate" href="https://359north.com/index-cn.html" hreflang="zh" />
        <link rel="alternate" href="https://359north.com/index-jp.html" hreflang="ja" />
        <link rel="alternate" href="https://359north.com/index-ca.html" hreflang="en-ca" />
        <link rel="alternate" href="https://359north.com/index-fr-ca.html" hreflang="fr-ca" />
        <link rel="alternate" href="https://359north.com/index-au.html" hreflang="en-au" />
        <link rel="alternate" href="https://359north.com/index-gb.html" hreflang="en-gb" />

Google Search Console is complaining about redirect errors for two of those pages: index-de.html and index-fr.html. I can't figure out what's wrong.

Also, should I have an alternate link for "en" or is the "x-default" good enough?

Update:

OK, I set it up as recommended, but it still fails to index:

main page: https://359north.com/index.html

    <link rel="alternate" hreflang="x-default" href="https://359north.com" />

    <link rel="alternate" hreflang="en-AU" href="https://359north.com/au" />
    <link rel="alternate" hreflang="en-CA" href="https://359north.com/ca" />
    <link rel="alternate" hreflang="en-GB" href="https://359north.com/gb" />
    <link rel="alternate" hreflang="en-US" href="https://359north.com" />
    <link rel="alternate" hreflang="fr-CA" href="https://359north.com/fr-ca" />

    <link rel="alternate" hreflang="de" href="https://359north.com/de" />
    <link rel="alternate" hreflang="fr" href="https://359north.com/fr" />
    <link rel="alternate" hreflang="es" href="https://359north.com/es" />
    <link rel="alternate" hreflang="it" href="https://359north.com/it" />
    <link rel="alternate" hreflang="pl" href="https://359north.com/pl" />
    <link rel="alternate" hreflang="sv" href="https://359north.com/se" />
    <link rel="alternate" hreflang="ru" href="https://359north.com/ru" />
    <link rel="alternate" hreflang="uk" href="https://359north.com/ua" />
    <link rel="alternate" hreflang="hi" href="https://359north.com/in" />
    <link rel="alternate" hreflang="zh" href="https://359north.com/cn" />
    <link rel="alternate" hreflang="ja" href="https://359north.com/jp" />

    <link rel="canonical" href="https://359north.com">

secondary page: https://359north.com/gb/index.html

    <link rel="alternate" hreflang="x-default" href="https://359north.com" />

    <link rel="alternate" hreflang="en-AU" href="https://359north.com/au" />
    <link rel="alternate" hreflang="en-CA" href="https://359north.com/ca" />
    <link rel="alternate" hreflang="en-GB" href="https://359north.com/gb" />
    <link rel="alternate" hreflang="en-US" href="https://359north.com" />
    <link rel="alternate" hreflang="fr-CA" href="https://359north.com/fr-ca" />

    <link rel="alternate" hreflang="de" href="https://359north.com/de" />
    <link rel="alternate" hreflang="fr" href="https://359north.com/fr" />
    <link rel="alternate" hreflang="es" href="https://359north.com/es" />
    <link rel="alternate" hreflang="it" href="https://359north.com/it" />
    <link rel="alternate" hreflang="pl" href="https://359north.com/pl" />
    <link rel="alternate" hreflang="sv" href="https://359north.com/se" />
    <link rel="alternate" hreflang="ru" href="https://359north.com/ru" />
    <link rel="alternate" hreflang="uk" href="https://359north.com/ua" />
    <link rel="alternate" hreflang="hi" href="https://359north.com/in" />
    <link rel="alternate" hreflang="zh" href="https://359north.com/cn" />
    <link rel="alternate" hreflang="ja" href="https://359north.com/jp" />

    <link rel="canonical" href="https://359north.com/gb">

1 Answer 1

3

First,

<link rel="alternate" href="https://359north.com/index-fr.html" hreflang="fr" />

This is not a conventional way to specify a multi-regional/multilingual version of a page. Google's guidelines cite the use a subdomain or sub directory for the lang code...or have ccTLDs.

I suppose you still have unique pages for each country/language but I'd prefer to see it implemented in a conventional way.

enter image description here

So you'd have either:

https://en.example.com/index.html
https://fr.example.com/index.html
etc...

or

https://example.com/en/index.html
https://example.com/fr/index.html
etc...

Also what about https://359north.com? This is reachable, and likely the expected homepage, yet for your home button you link to /index.html. So you need to make a decision there. I would drop the index.html across the board. Here is an example of a correct (albeit incomplete) implementation assuming you're based in the US:

<link rel="alternate" hreflang="en-US" href="https://359north.com" />
<link rel="alternate" hreflang="en-GB" href="https://359north.com/en-gb" />
<link rel="alternate" hreflang="de" href="https://359north.com/de" />
<link rel="alternate" hreflang="fr" href="https://359north.com/fr" />
<link rel="alternate" hreflang="x-default" href="https://359north.com" />

Ardacar's theory that your redirect problem might have to do with no canonicals set is plausible. However, to me it seems like a Search Console false positive bug because you're only seeing this for two random pages. Make sure that you set up the canonicals correctly, as there is a very common wrong way to do this that I see all the time.

<!--British page-->

<link rel="alternate" href="https://359north.com/en-gb" hreflang="en-GB" />
<link rel="alternate" href="https://359north.com" hreflang="en-US"/>
<link rel="canonical" href="https://359north.com"/>

The above tells search engines that even if a British user searches for this page, we’d like the US page to show up in search results.

So the correct way to do this would be:

<!--USA Page-->

<link rel="alternate" href="https://359north.com/en-GB" hreflang="en-GB" />
<link rel="alternate" href="https://359north.com" hreflang="en-US" />
<link rel="canonical" href="https://359north.com"/>
<!--On British Page-->

<link rel="alternate" href="https://359north.com/en-gb" hreflang="en-GB" />
<link rel="alternate" href="https://359north.com/" hreflang="en-US" />
<link rel="canonical" href="https://359north.com/en-gb"/>
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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