Technical SEO·Advanced·11 min read

Hreflang for international SEO. The fiddliest tag in SEO, explained honestly.

If you sell in more than one country or language, hreflang is the tag that tells Google which version of a page is for which audience. Setting it up correctly is fiddly. Setting it up wrong is worse than not using it at all.

What hreflang actually is

Hreflang is an HTML attribute (or HTTP header, or sitemap entry) that declares the language and optional country targeting for a page. It tells search engines: this URL is for users who speak this language in this country, and the same content also exists at these other URLs for other languages or countries.

The classic example. Your business sells in Australia and the UK. You have one product page targeting AU audiences at example.com/au/widget and another for UK audiences at example.com/uk/widget. The content is nearly identical: same product, slightly different pricing in AUD vs GBP, different stockists, different shipping copy. Without hreflang, Google might decide the two pages are duplicates and only index one. With hreflang, Google understands they are deliberate variants and serves the AU page to AU searchers and the UK page to UK searchers.

One important nuance. Hreflang is not a ranking factor. It does not boost any of the pages. It does not move authority around. All it does is help Google serve the right variant to the right audience and prevent your variants from being treated as duplicates. The work is defensive, not offensive.

When you need it (and when you do not)

You need hreflang if you have:

  • Multiple versions of similar content targeted at different countries (AU, NZ, UK, US variants).
  • Multiple language versions of the same page (English and Mandarin, English and Vietnamese).
  • Country-specific currency, pricing or stockist information that makes content meaningfully different per region.
  • Subdomains, subfolders or ccTLDs serving different regions from the same business.

You do not need hreflang if you have:

  • A single Australian site serving only Australian customers. You may serve overseas visitors but the content is not customised by country.
  • A single-language site with no regional variants.
  • Identical content reachable at multiple URLs but with no regional intent. (That is a canonical job, not a hreflang job.)

For most Perth small businesses, the answer is no. The exception is exporters, mining-services companies operating in multiple jurisdictions, and SaaS or content businesses targeting both AU and overseas customers.

The syntax in 5 minutes

The most common form is a <link> tag in the <head>:

<link rel="alternate" hreflang="en-AU" href="https://example.com/au/widget/">
<link rel="alternate" hreflang="en-GB" href="https://example.com/uk/widget/">
<link rel="alternate" hreflang="en-NZ" href="https://example.com/nz/widget/">
<link rel="alternate" hreflang="x-default" href="https://example.com/widget/">

The hreflang value follows the ISO format. The language part is two letters (ISO 639-1): en for English, fr for French, zh for Chinese. The optional country part is two letters (ISO 3166-1 Alpha-2) with a hyphen: AU for Australia, GB for United Kingdom (not UK, which is a common mistake), NZ for New Zealand. Case does not matter to Google but lowercase language and uppercase country is the standard convention.

The x-default value is special. It declares a fallback to use when no other hreflang matches the user. Useful if you have a global page or a language selector. Optional.

Hreflang is bidirectional. Every page in the set has to list every other page in the set, including itself. If page A declares hreflang to page B, page B must also declare hreflang back to page A. If B does not declare the return link, Google ignores the entire hreflang annotation from A.

This is the rule that breaks the most hreflang implementations we see. Someone sets up hreflang on the AU pages but forgets to set it up on the UK pages. Or the AU pages link to the UK page at /uk/ but the UK page links back to the AU page at /au/ with a trailing slash mismatch. The annotation looks complete on each individual page but the return-link audit fails. Google silently discards the whole set.

Best practice. Every page in the hreflang group declares all the variants, including itself. The hreflang block on the AU widget page lists AU, UK, NZ, and AU (itself). The block on the UK widget page is identical. The block on the NZ widget page is identical. The blocks are copy-pasted into every variant of the page set so you cannot accidentally omit one.

This is also why hreflang scales painfully. A 500-product catalogue across four countries needs hreflang annotation on every variant of every product. That is 2,000 pages, each carrying a four-item hreflang block. The maintenance gets serious fast. Most sites that need hreflang at scale eventually move it from HTML head tags into XML sitemap entries because that is easier to generate dynamically.

Three places to declare hreflang

You can put hreflang annotations in one of three places. Pick one. Mixing methods leads to conflicts.

Method 1. HTML head tags

The most common method. Put the <link rel="alternate"> tags inside the <head> of every page in the set. Easy to view, easy to validate with a browser inspector. The downside: every page has to carry the full annotation block, which grows with the number of variants.

Method 2. HTTP response headers

For non-HTML resources (PDFs, video files) where you cannot use an HTML tag. Send an HTTP Link header from your server with the hreflang relations. Rare. Useful only when the content cannot host HTML metadata.

Method 3. XML sitemap entries

Add <xhtml:link> elements inside each URL entry in your XML sitemap. Easier to maintain at scale because you generate the sitemap once from your database. The downside: you cannot inspect hreflang per page just by viewing source; you have to look in the sitemap.

For sites with more than about 1,000 hreflang-tagged URLs, the sitemap method is usually worth the change. For smaller sets, HTML head tags are simpler.

Common mistakes

Do
  • Use proper ISO codes. en-GB not en-UK.
  • Include every variant in every variant's hreflang block, including the page itself.
  • Use absolute URLs in the href.
  • Run Screaming Frog's hreflang audit regularly to catch return-link errors.
  • Combine hreflang with self-referencing canonical tags. Both serve different jobs.
Do not
  • Use en-UK, en-EU or any non-ISO code. Google ignores invalid codes.
  • Set up hreflang on AU pages and forget the UK and NZ pages. The set fails.
  • Mix HTML head, HTTP header and sitemap methods on the same site. Pick one.
  • Point hreflang at noindex pages, redirected URLs or 404s. The annotation gets discarded.
  • Use hreflang for content that is genuinely the same. That is canonical territory.

Tools and checklists

  1. Screaming Frog. Free up to 500 URLs. The Hreflang reports show every annotation on every page, flag return-link mismatches, and list any pages where hreflang URLs return non-200 status codes. Indispensable.
  2. Search Console International Targeting report. Free. Shows hreflang errors Google has detected. Slow to update but authoritative.
  3. An hreflang testing tool. Several free online tools that validate hreflang for a given URL. Useful for spot checks.
  4. Our free SEO audit tool. Surfaces hreflang issues alongside the broader technical audit. Run a free audit.

For sites where international SEO is a meaningful part of the business, the engagement is bigger than a single page can carry. The website audit service covers full hreflang audits across multi-region catalogues. The ongoing maintenance sits inside the SEO retainer.

Perth and Australian context

Most Perth and WA businesses do not need hreflang. The ones that do usually fall into one of these categories.

WA mining-services companies operating in multiple jurisdictions. A Karratha or Port Hedland business serving clients across AU, Indonesia, Chile and South Africa often has separate URL paths for each market with different services, certifications and case studies. Hreflang keeps Google from blending them. The mining SEO industry page covers the pattern.

Australian SaaS and ecommerce exporters. A Perth tech company with AU, NZ, UK and US customer bases. The product is the same; the pricing pages, terms of service and case studies differ by region. Hreflang is critical here because Google would otherwise blend the variants.

Trans-Tasman businesses. AU and NZ sites for the same brand, often with similar content but different stockists, shipping and warranty terms. Common in retail, ecommerce, professional services. Each side needs hreflang annotation pointing at the other.

Multi-language Perth sites serving immigrant communities. A healthcare practice in Cockburn or Mandurah with English and Mandarin versions of key pages. The Mandarin pages need hreflang declaring them as zh-AU or zh, and the English pages need a return link declaring en-AU. Often missed because the developer set up the language switcher but never added the hreflang annotations.

One pattern across all four. Hreflang gets set up imperfectly the first time. The return-link symmetry breaks. The audit a year later finds Google has been ignoring the whole annotation set. The fix is mechanical, but the fix has to happen on every page in the set, which means it scales as a project rather than a quick tweak.

Frequently asked

What is hreflang in plain English?
Hreflang is an HTML attribute that tells Google which language and country each version of a page is intended for. If you have an Australian page and a UK page with similar content, hreflang says one is for AU and one is for UK so Google shows the right one to each audience instead of merging them into one search result.
Do I need hreflang for a single-country business?
No. If your site serves only Australia and has no language variants, hreflang is not needed. It comes into play when you have multiple country-specific or language-specific versions of similar content.
What is the difference between hreflang and canonical?
They do different jobs. Canonical says which version of a duplicate is the master to be ranked. Hreflang says which version of similar content is for which audience. Use both together. Each language variant should have a self-referencing canonical and a complete hreflang block listing every variant including itself.
Where do I put hreflang tags?
Three options. In the HTML head of each page. In the HTTP response header for each URL. In an XML sitemap entry for each URL. Pick one. Most sites use HTML head tags because they are easiest to validate. Larger sites prefer sitemap entries because they are easier to maintain at scale.
What is x-default in hreflang?
x-default is a fallback hreflang value that tells Google: if none of the listed languages or countries match the user, show this version. Common pattern is to point x-default at a global English page or a language selector page. Optional but useful.
See how your site stacks up

Get a free SEO audit of your site.

30 seconds. Real Lighthouse scores, real keyword data, real backlink profile, AI-generated quick wins. Free, no sales pitch.

Get a Free SEO Audit

Or call 0435 462 205