Empty hreflang URLs are going to be shown as errors in Google Search Console.
Luckily, you can update your hreflang attributes to populate a URL. Read on to learn how.
Table of Contents
The Issue With Empty Hreflang URLs
Hreflang must have the URL populated for Google to pick it up. If your hreflang is missing a URL, you can add one.
How to Add a URL to Your Hreflang Attribute
If you have the proper edit access on your site, you can update the hreflang manually. This will solve the problem on a page-by-page cadence.
If you don’t have the necessary edit access, you may need to bring in the dev team.
Adding URLs to Hreflang at Scale
A manual approach isn’t the only solution to this problem.
To bypass the dev team and implement changes to your site across thousands of pages, you can leverage SEO execution platform ClarityAutomate.
Here’s the quick 5-step process.
- Select what you'd like to optimize: Code
Since hreflang is a part of your page's code, that’s what we’re looking to optimize. - Choose how you'd like to optimize it: Update
Since the hreflang tag exists but is missing the href attribute, we’re looking to update it. - XPath location: XPath of the hreflang with the missing href
Selecting the correct XPath allows us to narrow in on the specific hreflang entry with the issue. - Attribute: href
The attribute that is empty and needs to be updated in this scenario is the href. - New Value: A valid hyperlink for the hreflang attribute
Lastly, we simply enter a valid URL to fill the missing gap.
Before and After
ClarityAutomate allowed us to add a URL to this attribute and push it live in just a few minutes.
Looking for other hreflang issues?
- Conflicting Hreflang and rel=canonical
- 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
- 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