Hreflang
Commonly known as one of the most complex areas of technical SEO, hreflang tags are used to inform search engines of different country and language versions of a site. There are a lot of complex factors to consider to ensure the correct implementation of these tags and our SEO Office Hours notes cover many real-world scenarios and Google’s recommended course of action.
For more on international website optimization, check out our further resources:
The Ultimate Guide to International SEO
An SEO’s Guide to Hreflang Tags
The Challenges of Website Internationalization for Users & Search Engines
The Most Common Mistakes in International SEO
Self-referencing HREFLANG Tags are not Essential
Self-referencing hreflang tags are recommended to make it easier for webmasters to duplicate blocks of hreflang links on inter-related pages and to validate they are set up correctly, but they are not essential for Google.
Add Hreflang Links to Canonical URLs Only
Hreflang links should point to canonical URLs only, as canonialised URLs won’t be indexed or crawled often enough to notice the connection between the canonical URL and those specified in the hreflang tags.
Hreflang Data in Sitemaps May be Shown as ‘No Return’ Error Until the URLs are Recrawled
Until pages have been recrawled, you might see hreflang ‘no return hreflang’ errors in search console for hreflang data added to a Sitemap.
Hreflang Swaps URLs in Results but Doesn’t Affect Rankings
Hreflang doesn’t affect rankings, it affects which URL Google shows in search results, which is the one which Google thinks is most appropriate.
Pages Can Be Assigned Multiple Hreflang Tags
Pages can have multiple hreflang tags going to the same page for different countries.
Hreflang Pages Can Be Canonicalised to One Version
If you hreflang a set of pages, and canonicalise to one version, Google may show the different URLs but all with the title and description of the canonical version. However John advises against this configuration.
Structured Data and Hreflang Need to be Added to Mobile Pages
When Google moves to mobile first, the rel alternate and canonical tags won’t need to be changed, but the mobile pages will require dedicated structured data and hreflang tags.
Separate AMP Pages Don’t Need Hreflang
If you have separate AMP pages, you don’t need to add hreflang. Implement in on the main desktop pages, the same as a dedicated mobile site.
Hreflang Can be Added with JavaScript
It’s fine to use JavaScript to insert the hreflang tags, provided they are visible in the correct part of the page when rendered.
Put Hrelfang Meta Tags at the Top of the Head
Cruft’ above hreflang tags can close the head, and cause the tag to be seen within the body, and it will be ignored.