The language code must precede the country code to have a valid hreflang attribute. If your order is invalid, you can update the hreflang to swap the order and resolve this issue.
Here’s an example to visualize the issue:
Correct: hreflang=“en-us”
Incorrect: hreflang=“us-en”
Google expects the language code to precede a country code. If the values in a hreflang attribute are in reverse order, it’s not valid. That means search engines won’t follow the instructions set by the hreflang.
The solution here is simple: ensure the language code precedes the country code. If your order is incorrect, you can update the hreflang code.
You’ll only want to rearrange the order of the country and language codes. If all other elements like the href URL are in place, they’ll require no changes of their own.
In order to do this, you may need help from the dev team. Or, you can make the update yourself if you have the proper edit permissions to change your site’s code.
A second way to update your hreflang values is to use an SEO execution platform like ClarityAutomate. The technology lets you scale your implementation across thousands of pages, all with just a few clicks.
Here’s the quick step-by-step process that can be applied in ClarityAutomate to fix the issue of an invalid order.
Notice how this hreflang originally included “us-en”. Now, we’ve updated it to correctly say “en-us”.