Home Learning Centre Hreflang Tags Explained: When You Need Them & How to Use Them

Hreflang Tags Explained: When You Need Them & How to Use Them

9 min read
Share

Your Australian site ranks beautifully at home. Then you launch a New Zealand version, and Google starts serving your .com.au page, including Aussie pricing and Aussie shipping, to shoppers in Auckland. Or one of the two pages disappears from search altogether.

That’s the exact problem hreflang was built to fix. So what is hreflang? It’s a small piece of code that tells search engines which version of a page belongs to which language and region, so the right customer lands on the right URL. Get it right, and your regional pages stop competing with each other.

Quick answer.

  • Hreflang is an annotation, not a ranking factor. It doesn’t push you up the results; it decides which of your existing pages gets shown to which audience
  • You need it if you run the same content in multiple languages, or the same language across multiple countries (the classic Australian case: en-AU, en-NZ, en-GB, en-US)
  • Every page must reference itself, and every alternate must link back
  • Three hreflang implementation methods exist: HTML link tags, XML sitemaps and HTTP headers. Google treats all three as equivalent, so pick the one your site can maintain
  • Bing now documents hreflang too, as of its December 2025 duplicate content guidance

 

What is hreflang?

Hreflang is an HTML attribute that maps out the alternate language and regional versions of a page. It sits inside a rel=”alternate” link element and names a language code, an optional country code, and the URL of that version.

Here’s what an hreflang tag looks like in the <head> of an Australian page with a New Zealand twin:

<link rel="alternate" hreflang="en-au" href="https://example.com/au/product/" />
<link rel="alternate" hreflang="en-nz" href="https://example.com/nz/product/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/product/" />

Three things are happening there. The first two lines say “these two pages are the same content, targeted at different countries.” The third names a fallback for everyone else.

The attribute was introduced by Google in 2011 and is supported by Google and Yandex, with Bing now referencing it in its own documentation. Simply, an hreflang tag groups your near-duplicate pages into a cluster and labels each member, so a search engine can swap in the correct one at the point of ranking.

Language codes vs region codes. Language codes use ISO 639-1 format: en, de, zh. Region codes use ISO 3166-1 Alpha 2: AU, NZ, GB. You combine them with a hyphen: en-au. However, you can’t use a country code on its own. The first code denotes the language, and Google doesn’t automatically infer the language from a country code. So hreflang=”au” doesn’t mean Australia. It means Aragonese.

 

What is hreflang unable to fix?

Hreflang does not consolidate ranking signals. Links pointing to your NZ page don’t flow through to your AU page. Each URL still earns its own authority.

It doesn’t make duplicate content disappear either. It helps search engines pick the right version rather than penalising you for near-identical pages, but it isn’t a licence to spin up twelve carbon copies.

And it won’t rescue a page that isn’t indexed. If your NZ pages are blocked, noindexed or orphaned, hreflang has nothing to work with.

Treat it as one of several critical technical SEO ranking factors working together, not a standalone fix.

 

Do I need hreflang? A 30-second test.

Ask yourself one question: do you have two or more URLs with substantially the same content, aimed at different languages or different countries?

If yes, you need it. If no, you don’t. Here’s how it plays out for common Australian setups:

Your situation Do I need hreflang?
One Australian site, English only, AU customers only No
AU site plus a NZ or UK site with near-identical English pages Yes – same-language, different-region
English site with Simplified Chinese translations Yes – multilingual
Australian site with a /en/ and /zh-hans/ folder Yes
Separate pages for Sydney, Melbourne and Brisbane No – that’s internal linking and local SEO
Global .com serving everyone, no localised versions No

Hreflang handles countries and languages, not suburbs. City landing pages are a different job entirely.

The commercial case is easy to make. Australians spent $82.6 billion online in 2025, 24% of all retail spending, and 5.6 million Australians, or 22% of the population, use a language other than English at home. If you’ve built translated pages or trans-Tasman versions and skipped the annotations, you’re asking search engines to guess.

 

Three hreflang implementation methods.

Google is method-agnostic. Pick based on how your site is built and who maintains it.

Method Best for Watch out for
HTML <link> tags Small to mid-size sites, CMS-driven pages Page weight – 40 locales means 40 lines on every page
XML sitemap Large sites, ecommerce, frequent changes Needs disciplined sitemap generation
HTTP headers Non-HTML files like PDFs Requires server or CDN access

Method 1: HTML link elements. The most common hreflang implementation. Add one <link> per version in the <head>, including a self-reference for the page.

<head>
<link rel="alternate" hreflang="en-au" href="https://example.com/au/" />
<link rel="alternate" hreflang="en-nz" href="https://example.com/nz/" />
<link rel="alternate" hreflang="en-gb" href="https://example.com/uk/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
</head>

Simple until it isn’t. Twenty markets across ten thousand product pages produce a lot of markup, which is why big retailers move to sitemaps.

Method 2: XML sitemaps. Sitemaps keep the annotations out of your page source entirely, using the xhtml:link element:

<url>
<loc>https://example.com/au/product/</loc>
<xhtml:link rel="alternate" hreflang="en-au" href="https://example.com/au/product/"/>
<xhtml:link rel="alternate" hreflang="en-nz" href="https://example.com/nz/product/"/>
</url>

The xmlns:xhtml=”http://www.w3.org/1999/xhtml” namespace declaration must sit in your opening <urlset> tag, or the file won’t validate. If your sitemaps need work before you add locale data, start with the fundamentals of creating XML sitemaps that boost SEO.

Method 3: HTTP headers. For files that have no <head> (PDFs, mostly), return the annotations as a Link: header:

Link: <https://example.com/au/guide.pdf>; rel="alternate"; hreflang="en-au",
<https://example.com/nz/guide.pdf>; rel="alternate"; hreflang="en-nz"

Niche, but useful if you gate whitepapers or spec sheets by market.

One method only. Mixing HTML tags and sitemap annotations for the same URLs creates conflicting clusters.

 

The three rules that break most implementations.

Almost every failed hreflang implementation breaks one of these.

  1. Every page references itself. Google requires that “each language version must list itself as well as all other language versions.” Miss the self-reference, and the cluster is incomplete.
  2. Return links must be reciprocal. If page A points to page B, page B must point back to A. No return link, no annotation.
  3. Canonicals must agree with hreflang. This is the quiet killer. If /nz/product/ points to /au/product/, you’ve told Google the NZ page shouldn’t be indexed at all, and the hreflang cluster collapses. Every page in a cluster should be self-canonical.

Get those three right and you’ve solved roughly 80% of the hreflang tag problems we see in audits.

 

Language codes: where Australian sites get it wrong.

Four errors come up again and again on AU sites.

  • Using en-uk. The country code for the United Kingdom is GB, not UK. Google lists UK among reserved codes and simply ignores that part of the annotation
  • Using en-eu. The EU isn’t a country. Neither is en-asia or en-apac. If you need broad coverage, use the bare language code en and let it act as the catch-all
  • Over-targeting. Running en-au, en-nz, en-sg and en-hk when three of those pages are identical creates maintenance overhead for no gain. Consolidate to en plus your genuinely differentiated markets
  • Skipping x-default. The x-default value handles everyone your other annotations don’t match – a Brazilian visitor hitting an AU/NZ/UK cluster, for instance. Google recommends it “especially on language/country selectors or auto-redirecting home pages”

Don’t auto-redirect by IP address. Google’s guidance is unambiguous because most crawling originates in the US, and forced redirects prevent search engines from seeing your other versions at all. Offer a country selector instead, and let people choose.

 

How to automate hreflang at scale.

Hand-coding annotations across a large catalogue is a losing game. Automate the generation instead.

Shopify. Shopify builds them for you. Shopify’s documentation confirms it “adds hreflang tags to your theme automatically through the content_for_header object,” and the tags update when markets, domains or languages change. Shopify also warns that “adding your own tags on top of the automatic ones can produce duplicate or conflicting annotations” – so if you’re on Shopify Markets, leave the theme alone.

WordPress. WordPress handles it through multilingual plugins such as WPML, Polylang or Weglot, which generate annotations from your translation relationships.

Custom builds. Custom builds should generate hreflang from a single source of truth (your locale database or CMS market configuration), rather than a hardcoded list. Then output it into your XML sitemaps at build time. When you add a market, the annotations update everywhere at once.

Whatever creates the page relationships should also create the annotations. Manual lists rot the moment someone launches a new locale.

 

How to audit and fix hreflang errors.

Bad news first. Google Search Console’s International Targeting report is gone. So you’ll need a crawler. Screaming Frog’s SEO Spider flags the full set of issues, including:

  • Missing self reference. URLs missing their own annotation
  • Missing return links. Alternates that don’t point back
  • Non-200 hreflang URLs. Annotations pointing at redirects, 404s or dead pages
  • Non-canonical return links. Return links going to non-canonical URLs
  • Noindex return links. Alternates carrying a noindex tag
  • Inconsistent language and region return links. Mismatched codes between pages
  • Outside <head>. Link elements injected into the body, where they’re ignored

Work through them in that order. Self-references and return links first, because everything else depends on the cluster being complete.

A quick way to sanity-check a single page: view source, find your annotations, and confirm that each URL loads with a 200 status and returns the matching set. If you want a broader health check across your whole site first, run our free SEO audit tool to see what else is holding those pages back.

Does Bing use hreflang?

Yes. Bing spent years pointing publishers at the content-language meta tag instead, and dozens of hreflang guides still repeat that.

Bing’s December 2025 duplicate content guidance now says directly: “Use hreflang to define language and regional targeting.” If your international SEO strategy was built around the assumption that Bing ignores hreflang, it’s worth revisiting, particularly for B2B audiences on Windows devices, where Bing’s share is meaningfully higher than its overall average.

 

Getting it right the first time.

Strip away the syntax, and what hreflang is comes down to one job: making sure the page you built for a market is the page that market actually sees. It rewards precision and punishes guesswork. Map your clusters, keep every page self-referencing and self-canonical, automate the output, and re-crawl after every market launch.

Losing revenue to a broken international setup? First Page has driven more than $3.8 billion in sales for clients over the past 15 years, and our technical SEO services team untangles hreflang clusters, canonical conflicts and indexation problems every week. Book a free strategy session with our SEO agency and we’ll show you exactly which of your international pages are being served to the wrong market.

Talk to our Digital Marketing Agency Australia team today.

 

Hreflang FAQs.

It’s a tag that tells search engines “this page has other versions for other languages or countries, and here’s where they are.” The search engine then shows each user the version built for them.
No. If you have one site, one language and one market, there’s nothing to annotate.
Not directly. It improves which page ranks for which audience, which usually lifts click-through rate, engagement and conversions in each market – but it isn’t a ranking signal on its own.
There’s no published limit. Practically, if you’re pushing past 30 or 40 versions per page, move your hreflang implementation into XML sitemaps to keep page weight down.
Yes, and you should, but the canonical on each page must point to itself. A cross-domain or cross-locale canonical breaks the cluster.
Google ignores the broken annotations and falls back to its own judgment about which page to show. You don’t get a penalty; you get the wrong page ranking in the wrong market.
Yes, if they target different countries. Same-language, different-region setups like en-AU and en-NZ are the single most common reason Australian businesses need it.

 

 

 

Free strategy session
Ready to get your traffic, leads & revenue growing?

Book a call with one of our specialists. We’ll run a free audit to show you where you’re at and how we can grow your revenue.

Claim your session
Nick Bell

A fanatical biohacker, Nick is unsuccessfully trying to hold on to his fledging youth. Aside from health, Nick is obsessed with building best in class digital marketing agencies. At home, Nick is a slave to his three daughters and better, smarter wife.

Next in this series On-Page SEO: What it is & how to do it in 2026 (Checklist) Read next →
What we do

Our SEO services

Get Started

Enter your details

Thank You!

Your Digital Marketing Specialist will be in touch within 24 hours. Alternatively, for an instant chat, please call 1300 479 226