• Resolved akiraanastasia

    (@akiraanastasia)


    I am getting errors and warnings in SEMRush, Bing Webmaster. Bing says pages are missing language attribute. While SEMRush says No hreflang and Lang attributes >
    Perform the following:
    – Add a lang attribute to the <html> tag, e.g., “<html lang=”en”>”
    – Add a hreflang attribute to your page’s <head> tag, e.g., <link rel=”alternate” href=”https://example.com/” hreflang=”en”/>

    So we need to fix this. I asked theme devs and they said, may be because of plugin, these attributes are missing. Someone please help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • @akiraanastasia

    Please bear in mind that Yoast does not come with hreflang tags or settings. A multilingual plugin like MultilingualPress will handle the generation of hreflang tags automatically for you.

    You may need to contact the support team of the multilingual plugin you are using.

    Thread Starter akiraanastasia

    (@akiraanastasia)

    @suascat_wp We are not using any multilingual plugin. And what about Add a lang attribute to the <html> tag, e.g., “<html lang=”en”>” warnings.

    Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    We are afraid to say that Yoast SEO doesn’t add the HTML lang attribute as it’s something that should be taken care of in the currently active theme. If not, you could use the language_attributes(); WordPress function yourself to the appropriate place to output the correct HTML lang attribute.

    On the other hand, if you are not running a multilingual site, there’s no need to output the hreflang anywhere on your site. However, if you are running a multilingual site, you might want to consider switching to a multilingual plugin like WPML that automatically adds the hreflang for everyone.

    Plugin Support devnihil

    (@devnihil)

    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘No hreflang and Lang attributes’ is closed to new replies.