How to "locale" properly for SEO?

Hello!

I just updated my website design and I also added a second language since localization feature is finally out.

The first problem I encountered was my website health rating (or whatever that is called) on ahrefs, semrush, etc went down dramatically. I have so many critical errors.

For example one error related to localization:

Ahrefs.com says my site has so many “Hreflang and HTML lang mismatch” errors on all of my pages. And the info they give about this error is:

"Pages with different language codes declared in HTML language attribute and in hreflang annotation for the URL.

Although Google might not be using the HTML lang attribute today, other search engines and browsers do."

First of all, I am not sure if localization fixes this issue out of the box or not. I am no expert. But it seems like it doesn’t. So I checked the options on my website. So normally I had language code “en” in my website settings. I thought maybe this code is telling search engines that my website content is in English while the website is offered in English and French now. So I get the error. So I removed it.

After a bit of research, I found out that I needed to add this code to my website. So I did. The code:

<link rel="alternate" href="https://www.mywebsite.com/" hreflang="x-default" />
<link rel="alternate" href="https://www.mywebsite.com/fr/" hreflang="fr-CA" />

But I still get the errors. So at this point I am cluless how to fix this issue.

The other localization related errors I am seeing on ahrefs.com are:

  • Missing reciprocal hreflang (no return-tag)

Explanation for this error on their website:
“Confirmation (return) links are missing for the pages declared in hreflang annotations. If page A links to page B in hreflang annotations, page B must link to page A in return. If this is not the case for all pages that use hreflang annotations, those annotations may be ignored or misinterpreted correctly. This issue can also be triggered by misused “x-default” hreflang. Whenever the optional “x-default” hreflang value is used, all pages of the hreflang group must reference the same “default” page.”

This is the error detail I am seeing (if it helps):
Screenshot 2024-03-07 122108

  • Hreflang to redirect or broken page

Explanation for this error on their website:

Pages that have a broken URL in their hreflang annotations.If hreflang URL does not point to a valid live page, hreflang annotations may be ignored or not interpreted correctly. Consequently, search engines may “overlook” alternate versions of your page and will not be able to point users to the most appropriate version of your page by language or region.

The error list goes on and on…

Could someone please guide me in the right direction to address this issue? I’m concerned that if it’s not resolved promptly, it could negatively impact my website.

If you’ve added the second locale, done your translations and republished, everything you need should be in place-

  • The alt language links are automatically created for you
  • The HTML lang attribute is created
  • The sitemap.xml is updated with the locale variants and x-default locale

I’d recommend you make certain that you do not also have a locale setting in your site settings, as it can conflict and confuse things with localization.

Beyond that there isn’t anything you need to do for SEO. Just create good content.

I’m having the same problem, trying to troubleshoot it right now.

One thing I noticed: I switched from Weglot to Webflow for locales. I forgot that I had custom HTML in the site settings for Weglot:

<!-- Weglot -->
<link rel="alternate" hreflang="en" href="https://www.broadkastr.be">
<link rel="alternate" hreflang="nl" href="https://nl.broadkastr.be">
<script type="text/javascript" src="https://cdn.weglot.com/weglot.min.js"></script>
<script>
    Weglot.initialize({
        api_key: 'xxx'
    });
</script>
<!-- End Weglot --> 

Removed that now, fingers crossed that fixes things. If you switched from another translation service, definitely worth checking.

Hi Michael,
I have the same problem with Hreflang.
Who can help me to fix it?

Hi @Mrs_At_Last ,

I can do an SEO review and help you work out any issues.
If you’re using Webflow Localization, it creates the tags you need, but you might have conflicts from custom code or a previous localization framework if you’ve used one before.

I’d need access to your site, and AHrefs reports. Drop me a message if you’re interested, and I’ll send you my details. You can click my name here to send me a message through the forum.

facing a related/similar issue - will DM you the details