How to Implement Hreflang
I've been speaking this week about how to implement hreflang and how you can do this on a website.
What you may or may not know is that there are three ways to specify hreflang:
- HTML tags
- XML sitemaps
- HTTP headers
Whichever method you choose, it's important that you only choose one. Hreflang can break easily on its own, and using more than one method makes this even more likely. You can even run into issues with conflicting tags which can cause larger issues with your international targeting.
I've included some information on each method in the links above; each has its pros and cons, but my personal preference is to use HTML tags as it tends to be the fastest and easiest way to implement them. All we have to do is to add the appropriate hreflang tags in the ‘head’ tag of the HTML.
Some extra considerations include:
- Understanding that hreflang tags work in pairs and are bi-directional.
- Self-referential hreflang tags must be used.
- X-default tags are recommended by Google, but they are not mandatory.
I like to set up regular maintenance/auditing of the hreflang for any website I'm working on. It is not something that you can "set it and forget it". There are so many things that can affect or can even break the hreflang altogether, so you need to keep an eye on it and check that it is configured correctly.