Hello! Since Rank Math doesn’t handle hreflang, what is the best way to implement a hreflang or html

Hello! Since Rank Math doesn’t handle hreflang, what is the best way to implement a hreflang or html lang tag on my website!? It’s a single language website! Thanks! 🙏🏼

4 comments

  1. Hello, Thank you so much for getting in touch.

    That tag is only usable if you have other languages on the same page to indicate to Google the other variations. If it’s a single language website you don’t need to include that.

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

  2. Hreflang is only for multi-language sites, as stated above, Tiago. You do need an HTML language declaration though – it can help with SEO, as well as being an accessibility requirement.

    By default, WordPress *should* be setting this for you automatically, inserting it just above the opening tag.

    First thing to try would be to go to the WP dashboard to Settings > General and scroll down to the Site Language setting. Try changing that setting to something else, save it, then change it back to Portuguese and save it again.

    Hopefully, this will force WP to rewrite your language declaration automatically. You can check by looking in the page source code (right-click and select View Page Source on your home page).

    It should end up looking like this at the very top of the page:


    Does that work?

Leave a comment

Your email address will not be published.