Adding Hreflang Tags with RankMath

#900038
  • Resolved Stefan
    Rank Math free

    Hello!

    I want to set hreflang tags using RankMath. I see ‘Hreflang alternate URL’ in the RankMath tab in Gutenberg, but when I put an alternate URL and a language code there, it generates only an hreflang tag of that alternate page, so there isn’t self-referencing.

    I’m sceptical about Googlebot accepting that as the right hreflang signal. When using this tool – https://technicalseo.com/tools/hreflang/- it shows that error (missing origin URL, self-referencing).

    What are your thoughts on this? Any way of adding a self-referencing tag as well with RankMath?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    We apologize for the issue you are facing with setting hreflang tags in Rank Math. It seems that you are encountering a limitation where only the alternate URL is being generated without a self-referencing hreflang tag.

    Currently, Rank Math does not automatically add a self-referencing hreflang tag when you specify an alternate URL in the Gutenberg editor. This can indeed lead to issues with how Googlebot interprets the hreflang signals, as it expects both the alternate and the self-referencing tags to be present.

    To ensure that Google recognizes your pages correctly, you may need to manually add the self-referencing hreflang tag in the head section of your pages. You can do this by adding the following code snippet directly into your theme’s header.php file or using a custom function:

    Replace https://rankmath.com/wp-content/uploads/2022/01/language-button-design.jpg with the URL of your current page and adjust the hreflang attribute accordingly.

    If you have further questions or need assistance with this process, please reply to this ticket, and a human agent from the Rank Math Support team will be happy to help you further. Thank you for raising this concern!

    Sources:
    Multilingual SEO with Rank Math SEO & WPML » Rank Math

    Stefan
    Rank Math free

    I’m not sure if I understand this. I would like to get help from an agent.

    Thanks in advance!

    Hello,

    Thank you for contacting Rank Math support.

    Our plugin doesn’t have any section to add Hreflang tag. The Canonical URL in the Advanced tab is different and you shouldn’t add any URL in that unless the page contains duplicate content and you don’t want it to be indexed.

    Since our plugin doesn’t support adding Hreflang tags, you must use some other plugin to do that.

    Please do not hesitate to let us know if you need our assistance with anything else.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘Adding Hreflang Tags with RankMath’ is closed to new replies.