hreflang, explained properly.
What is hreflang?
Hreflang is an HTML attribute that tells search engines what language and regional version of a page to show to users based on their location or language preference. It is critical for international SEO, making sure the right content shows up in the right country, in the right language, at the right time. Without proper hreflang, users might land on a version of your site in the wrong language or for the wrong country, creating a poor experience and undermining your search visibility abroad.
Why hreflang matters
Search engines like Google do not automatically know which version of your site to show in each country, especially when URLs are similar across language or region. Hreflang fixes that by providing a map of language and region pairs with the corresponding pages. This is crucial if you: - Run a multilingual website (for example English, French, Spanish), supported by a wider multilingual SEO strategy - Serve different content to different countries (for example UK versus US pricing), often via country targeting - Use ccTLDs (for example .co.uk versus .de) or subfolders and subdomains for international content At BrisTechTonic we work with ecommerce, SaaS and service businesses looking to expand globally, and hreflang is one of the first technical SEO tasks we tackle when implementing international SEO strategies. The official spec lives in the Google Search Central docs.
What does hreflang look like?
Here is a simple example of hreflang annotations in the head of your page: ```html <link rel="alternate" hreflang="en-gb" href="https://example.com/uk/" /> <link rel="alternate" hreflang="en-us" href="https://example.com/us/" /> <link rel="alternate" hreflang="fr-fr" href="https://example.com/fr/" /> <link rel="alternate" hreflang="x-default" href="https://example.com/" /> ``` Each line tells Google "this page is for this language and region". The x-default is a catch-all for users who do not match any of the specified versions.
Hreflang components
- **Language code:** 2-letter ISO 639-1 language code (for example en, fr). - **Region code:** optional 2-letter ISO 3166-1 Alpha 2 country code (for example gb, us, de). Combined, these form the hreflang value (for example en-gb, fr-fr).
Where can you add hreflang?
1. **HTML head:** as shown in the example above. 2. **HTTP headers:** useful for PDFs or non-HTML content. 3. **XML sitemaps:** the most scalable option for large websites. Whichever method you choose, keep it consistent across all pages and include self-referencing hreflang tags.
Hreflang best practices
- **Always include a self-referencing hreflang** for each page. - **Ensure bidirectional linking:** if Page A references Page B, Page B must reference Page A. - **Use canonical tags wisely:** canonical to the local version, not a global one. - **Do not mix language codes with incorrect region codes**, for example en-fr is invalid. Hreflang can get messy fast, which is why our technical SEO team often builds automated hreflang generators for large international sites.
Common hreflang mistakes
We have seen it all, from Shopify stores trying to do multilingual SEO with apps that butcher hreflang, to custom CMS setups that create duplicate pages without proper tagging. Common pitfalls include: - Missing or incorrect language codes - Not including all language and region pairs - Missing x-default versions - Using the same hreflang values for all pages - Pointing hreflang to 404s or redirects, which also creates duplicate content signals All of these can prevent your site ranking in the correct market or create duplicate content issues across versions.
Google and hreflang
Google is the only major search engine that uses hreflang. Bing and Yahoo use a different system called content-language in HTTP headers, and Baidu and Yandex have their own requirements. For Microsoft's tooling on the Bing side, see Bing Webmaster Tools. Since Google dominates the market, especially in English-speaking and European countries, hreflang remains a vital part of global SEO strategy.
Testing and validating hreflang
Always test your hreflang setup with: - **Google Search Console:** look for hreflang errors under International Targeting. - **Merkle's Hreflang Tag Testing Tool.** - **Screaming Frog:** crawl and visualise hreflang relationships. Catch issues early, or risk confusing Google and splitting your visibility across multiple competing versions of the same content.
Use cases by URL structure
- **Subdirectories:** /en/, /fr/, /de/, good for centralised sites. - **Subdomains:** fr.example.com, de.example.com, easier to segment. - **ccTLDs:** .co.uk, .de, .fr, stronger local trust signals but harder to manage.
How BrisTechTonic can help
If you are expanding into international markets, whether you are a UK business launching in the US or a European brand entering the English-speaking market, hreflang should be part of your technical SEO checklist. We include it in all SEO audits, and you can learn to implement it yourself in our step-by-step SEO Blueprint course.
hreflang: common questions.
When do I need hreflang?
When your site has versions of the same content for different languages or different countries. A site with English-only content does not need hreflang. A site serving en-GB and en-US, or English and Spanish, or UK and Australian variants of the same product, definitely does.
What format does hreflang use?
Two parts: a language code (ISO 639-1, like "en" or "es"), optionally followed by a country code (ISO 3166-1, like "GB" or "US"). Examples: "en", "en-GB", "en-US", "es-MX". Use just the language code when targeting all speakers of that language; add the country code when targeting a specific region.
Where do hreflang tags go?
Three options: in the head of each page (link rel=alternate hreflang), in the HTTP response header (useful for non-HTML files like PDFs), or in the XML sitemap. The sitemap method is usually easiest to maintain at scale because it centralises all language relationships in one place.
What is x-default in hreflang?
x-default tells search engines which version to show when none of the other hreflang tags match the user's language or location, typically your main language version or a generic landing page that lets users select their region. Adding x-default is best practice on any multilingual site.
What clients say about working with us.
“I've had the pleasure of working with Chris on several SEO projects for my websites in the health field. He was definitely been able to demystify things so that I felt able to make decisions with him and feel confident they were the right ones. For a non-techie, that is worth gold! I look forward to working with Chris again and warmly recommend him to anyone who - like me - is unsure about all things SEO.”
“I was recommended by my branding partner to use Chris and his team last year. I can’t recommend them highly enough. They are very responsive , easy to communicate with and great at translating techy stuff when needed. They are now an essential part of my business model”
“We've been working closely with Chris, Hannah and the team for over 12 months now. As a small company with ambitious growth plans, it was incredibly important that we made the right choice on who to trust with our SEO. 18 months later, we're totally thrilled with our experience so far and our growing online presence within our market. We'd happily recommend BTT and their services to other SMEs. Drop them an enquiry!”
Real people on your account, not a faceless agency.
You work directly with the senior people who do the work, a small Bristol team you will actually get to know, not a call centre or an account manager relaying messages.
Meet the team →





