Have you seen hreflang attribute error reported in Google Search Console? You should read this post to understand what is hreflang and why is it important for your website’s SEO.
There are multiple HTML tags and attributes which Google and other search engines use to identify the content format, language, location, and website structure.
By collecting this information, search engines display results more accurately to its users. That’s the reason, some HTML tags and attributes are considered important in the SEO world because search engines give these tags importance.
What is HTML hreflang Attribute?
Hreflang attribute is an HTML attribute that specifies the language of the document in the link.
It is used simply to inform search engines about what language is used on a specific page and which region of users need to see this page.
For example, if your website visitor is from France, and you have content written in both English and French for the same page.
Using hreflang tag you can tell Google which page to redirect a French user, and if a user is from another country show them an English version of the page.
When is it approrpiate to Use Hreflang Attribute
If you have a multi-language website, and targeting audience in different countries hreflang should be an important part of your SEO.
However, if your website is in English only, you don’t need to use the hreflang attribute. You can ignore this error in Google Search Console.
Hreflang attribute can also help your multi-language content protect from Google’s duplicate content errors.
An example of such a scenario where a multilingual website can use hreflang attribute to save their content from duplicate content issues is when you are targeting different languages such as English US, English UK, and English AU.
These languages have minor differences, so if you don’t use an hreflang attribute, the chances are, Google will consider these pages as duplicate content. However, if you properly use hreflang attribute on all the version of the same page, your content will be considered different and there won’t have any content duplication issue.
Do you have a multilingual website? If yes, using hreflang attribute can save you a lot of trouble in the future. If it is a single language website then there’s no point in using hreflang attribute on your website.
Hreflang Supported Language and Region Codes
Hreflang accepts values that define languages ISO 639-1 and countries (ISO 3166-1). Both of these standards use two-letter codes to define the country and language.
You can find out relevant codes for your language and region with the help of these Wikipedia articles:
Hreflang Tools to Debug and Generate hreflang Attributes
The process of using hreflang attributes in the multi-language website could be confusing. Hence, you must debug hreflang errors using these tools:
International Targeting Report
Google Search Console has a report by the name international targeting report. You can use this report to tell Google specifically which region and languages are you targeting on your website. Once, it crawls and indexes all those pages, it will start showing reports and errors.
By entering information such as a page URL, you can check whether a page has used proper hreflang attributes. This hreflang testing tool can test your page for multiple user agents such as Google, Yahoo, and Yandex.
You can find out errors and tutorials on how to solve them with this useful tool.
You can generate the hreflang tags for your multi-language or multi-country site with this useful tool.
It will help you to generate the hreflang tags patterns to use in the different language and country versions of your pages, using the correct values and syntax following Google’s specifications, with ISO 639-1 for languages and ISO 3166-1 Alpha 2 for countries.
I have recently compiled a list of the best free SEO tools, you should give it a read.
If you like this post, then be sure to check out these best WordPress SEO plugins as well.