Conflicting Hreflang and Canonical
Hreflang tags should be used in conjunction with the canonical tag. The canonical tag and the hreflang tag for each version of a page should both point to the same URL.
If they point to different URLs, you can update the hreflang or the canonical, so they have the same URL.
Table of Contents
Conflicting Signals Confuse Search Engines
If the canonical URL and hreflang URL conflicts, the search engine may index the incorrect page.
How to Update Hreflang and Canonicals
Ensure that your hreflang and canonical tags are used together and do not point to different pages.
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.
Making Site Changes at Scale
While the above solution will certainly get the job done, it’s more manual in nature. That means it’s harder to scale, too. Don’t worry, you can use SEO execution technology ClarityAutomate to deploy optimizations across thousands of pages in a matter of minutes. Here’s how.
Updating the Hreflang with the Same Hyperlink Used for the Canonical Tag
- Select what you'd like to optimize: Code
Since hreflang is a part of your site’s code, that’s what you would select in ClarityAutomate. - Choose how you'd like to optimize it: Update
We’re looking to update the hreflang url (instead of adding or deleting it). - XPath location: XPath of the hreflang with the href that needs to be updated Attribute: href
This step lets us hone in on the specific hreflang url that needs to be updated. - New Value: The hyperlink used in the canonical tag
Lastly, we set the correct URL that matches the canonical tag. Now, the URLs match.
Look at this example:
Updating the Canonical with the Same Hyperlink Used for the Hreflang
You may need to do the opposite of the above and update the canonical instead of the hreflang.
The process remains simple with ClarityAutomate.
- Select what you'd like to optimize: Canonical Tag
If you want to optimize the canonical tag instead of the hreflang, select “Canonical Tag”. - Choose how you'd like to optimize it: Update
This step still requires an update. We don’t want to add or delete anything. - New Value: The hyperlink used in the hreflang
Specify the URL that’s being used for the hreflang so the two can match. That’s it!
Now, the canonical URL matches that of the hreflang:
Looking for other hreflang issues?
- Hreflang with multiple defaults
- Invalid region in the Hreflang attribute
- Invalid language in the Hreflang attribute
- Hreflang with Duplicate Language/Region Combinations
- Hreflang Missing Language Entry
- Underscore Instead of Dash in Hreflang
- Empty Hreflang URL
- Hreflang Not Present
- Hreflang Present Outside <head>
- Hreflang URL Is Invalid
- Invalid order of Hreflang values
- No self-referencing Hreflang tag
- Hreflang Using Relative links