• Resolved Piramidon

    (@piramidon)


    Google states:

    For language/country selectors or auto-redirecting homepages, you should add an annotation for the hreflang value “x-default” as well:
    <link rel="alternate" href="https://example.com/" hreflang="x-default" />

    As far as I understand it, this means that the aforementioned line has to be added to the

    <link rel="alternate" href="https://example.com/fr" hreflang="fr" />
    <link rel="alternate" href="https://example.com/en" hreflang="en" />

    already implemented by Polylang in order for Google to properly recognize language auto-detection and redirection. Obviously, I could install an extra plug-in and insert the additional line into the header of the start pages – but is there a possibility to handle it with Polylang, or plans to implement it by default?

    https://www.ads-software.com/plugins/polylang/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Chouby

    (@chouby)

    Hi!

    Polylang does not implement a language/country selector homepage.
    It does have (depending on your options) an auto-redirecting homepage. But in that case, the redirection occurs before any hml is outputed.

    Thread Starter Piramidon

    (@piramidon)

    Hi!

    Of course. But, if I understand the above-mentioned Google guideline correctly, the start pages (in different languages) are supposed to have the “x-default” value along with the other hreflang tags it (correctly) implements already, in order for the site not to have various ranking disadvantages…

    Plugin Author Chouby

    (@chouby)

    It was not obvious for me that I should output this on all front pages. Looking at the video and how it is done for play.google.com, it appears that you are right. I introduced it in the dev version (1.7.8.3).
    https://downloads.www.ads-software.com/plugin/polylang.zip

    Thread Starter Piramidon

    (@piramidon)

    Thanks a lot! Will give it a go ??

    Thread Starter Piramidon

    (@piramidon)

    That seems to work fine. Thanks again for the quick reaction!

    Hi Chouby,

    you added
    <link rel=”alternate” href=”https://example.com/&#8221; hreflang=”x-default” />
    great.
    But, could you add the ” / ” at the end of the URL. Today, with the last Polylang (1.7.10) we have ” https://example.com ” and the best url for google and co. is with the ending slash : https://example.com/

    Thanks for your great plugin (Super travail !)

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Implementation of hreflang="x-default" ?’ is closed to new replies.