Hreflang is one of the most misunderstood tags in SEO. It does not rank a page higher, it does not translate anything, and it does not fix duplicate content by itself. It is a set of annotations that tells Google which URL is the right version of a page for a given language or region, so a visitor in Toronto sees the Canadian page and a visitor in Sydney sees the Australian one. Most hreflang problems come from one of two errors: adding it when there was no reason to, or adding it with a mistake that causes Google to ignore it.
This guide covers the technical side: deciding which markets deserve separate URLs, choosing a structure, writing correct annotations and checking that Google follows them. The translation and localization workflow behind the content is a different job, covered in the multilingual content operations guide.
Every extra regional version costs money to build and keep current, and it splits links and effort across more pages. Create a separate version only when it will behave differently for searchers. Useful tests:
- Language. A Spanish-speaking audience searching in Spanish needs Spanish pages. This is the clearest case.
- Different offer. Pricing in another currency, different service availability, separate licensing or regulations, different phone numbers and addresses.
- Different vocabulary. Same language, different search terms. A US "drain cleaning" and a UK "drain unblocking" are examples; so is "dumpster rental" in the US versus "bin hire" in Australia.
- Different competition. Rankings and the businesses that appear differ by country, so one page rarely wins everywhere.
If the English pages for the US, Canada and Australia would be word-for-word identical except for a phone number, Google will often cluster them as duplicates and pick one to show. In that case a single page with clear regional contact details can serve all three markets better than three near-copies. Separate pages pay off when each has real regional proof: local project examples, local regulations, local pricing, and reviews from that country.
Local businesses with one physical service area often need no hreflang at all. A plumber in Phoenix does not need a Canadian version. The strategy matters for multi-country brands, franchises with regional sites, and companies serving distinct language groups in the same country, such as English and French in Canada or English and Spanish in the US. For a worked example of the second case, see the Toronto bilingual cleaning case study.
| Option | Example | Strengths | Trade-offs |
|---|---|---|---|
| Country-code domain | example.ca, example.com.au | Strongest country signal, easy for users to trust | Most expensive; each domain builds authority separately |
| Subdirectory | example.com/ca/, example.com/au/ | One domain, shared authority, simple to maintain | Weaker country signal on its own; needs clear local content |
| Subdomain | ca.example.com | Can be hosted separately | Treated more like a separate site; authority is not automatically shared |
| URL parameter | example.com?country=ca | None worth the cost | Hard to crawl and target; avoid |
For most small and mid-sized businesses, subdirectories are the practical choice, for the same reasons discussed in subdomain versus subdirectory for local pages. Use a country-code domain when you already own strong ones, need local legal separation, or expect to operate each country as an independent business. Google's old Search Console country-targeting setting has been retired, so your structure, hreflang, language and local signals (addresses, phone numbers, currency, local links) now carry the targeting load.
Hreflang can be delivered three ways: link elements in the HTML head, HTTP headers (useful for non-HTML files like PDFs), or entries in an XML sitemap. Choose one method per page set and keep it consistent. For a handful of pages the head is simplest; for hundreds of URLs, a sitemap is easier to generate and audit.
<link rel="alternate" hreflang="en-us" href="https://example.com/us/boiler-repair" />
<link rel="alternate" hreflang="en-ca" href="https://example.com/ca/boiler-repair" />
<link rel="alternate" hreflang="fr-ca" href="https://example.com/ca-fr/reparation-chaudiere" />
<link rel="alternate" hreflang="x-default" href="https://example.com/boiler-repair" />
The rules that cause most failures:
- Reciprocal return tags. If page A names page B as an alternate, page B must name page A. Missing return tags are the most common error, and Google may ignore the annotations that lack a match.
- A self-reference on every page. Each page should list itself in its own set.
- Full, absolute URLs. Include the protocol and hostname, not relative paths.
- Valid codes. Language uses ISO 639-1 (en, fr, es); region, if added, uses ISO 3166-1 alpha-2 (US, CA, AU). A region cannot stand alone. The UK is gb, so "en-uk" is wrong and "en-gb" is correct.
- Annotate only live, indexable URLs. Every URL in a set should return 200, be self-canonical and be allowed in robots.txt. A redirecting or noindexed URL inside a set breaks the cluster.
- One URL per language-region value. Do not list two different URLs for en-us on the same page.
- x-default is optional but useful. It points to the fallback, such as a country selector or a global page, for searchers who match none of your listed versions.
Hreflang and canonical tags answer different questions, and conflicts between them are a leading cause of ignored annotations. Each localized URL should canonicalize to itself. If the Canadian page canonicalizes to the US page, you are telling Google the Canadian page is a duplicate that should not be indexed, which contradicts the hreflang pair and usually leads Google to drop the Canadian version. The same applies to noindex, which removes a page from the set entirely.
Cross-domain setups follow the same principle: each country site canonicalizes to its own pages and uses hreflang to point to the others. Read the canonical tags guide for how Google picks a canonical when signals disagree, and the canonical versus noindex comparison for the rule on never combining them on the same URL.
When two regional pages are near-identical, such as en-us and en-ca, Google may still fold them together and show one of them regardless of hreflang. This is expected. Hreflang swaps the visible URL after Google has decided to rank the cluster, so differentiate the pages in ways a searcher can see.
Automatically redirecting visitors based on location or language settings seems helpful, but it commonly blocks crawlers. Googlebot mostly crawls from the United States, so a forced redirect to the US page can prevent it from ever seeing the Canadian or Australian versions. It also frustrates travelers and people using a VPN. Show a dismissible banner that suggests the right regional site instead, keep every version reachable by a normal link, and provide a visible country or language switcher using plain links that crawlers can follow.
Also keep the html lang attribute accurate on each page. Hreflang is the signal Google uses for targeting, but other search engines and accessibility tools read the page language declaration.
Hand-edited head tags break as soon as someone adds a page in one country and forgets the others. Generate the set from a data source: a CMS field that links translated pages, or a spreadsheet of URL equivalents turned into sitemap entries. A sitemap entry for the example above lists the page and each alternate, including itself, using xhtml link elements. Remember that the sitemap must also contain only canonical, indexable URLs; see the XML sitemap strategy guide.
Treat the set as a unit in the publishing workflow. A new Canadian page without a US equivalent should either get its own annotated set or none at all. Pages that exist in only some markets are normal; just do not list alternates that do not exist.
- Crawl the annotations. A crawler with hreflang reporting finds missing return tags, invalid codes, non-200 targets, canonical conflicts and noindex targets across the site.
- Check Google's selection. Use URL Inspection on a sample of regional pages and compare the user-declared canonical with the Google-selected one. If Google picks the US page for a Canadian URL, the pages are probably too similar or the signals conflict.
- Search from the target market. Check results with a location setting or a tool that checks results by country, and see whether the correct regional URL is shown.
- Segment Search Console. Filter Performance by country and by page to see whether the right pages earn impressions in the right markets. A US page collecting Canadian impressions suggests the Canadian equivalent is not winning.
- Re-audit after releases. Template changes and platform migrations often strip head tags. Add the check to the release routine described in the migration planning guide.
Does hreflang improve my rankings?
No. Hreflang does not boost rankings or consolidate link signals. It helps Google show the correct language or regional version of a page to the right searcher after it has decided the page deserves to rank. Its benefit is a better match for users, which can reduce wrong-country visits and bounces.
Do I need hreflang for en-US, en-CA and en-AU pages that are nearly identical?
It is worth reconsidering whether you need three pages at all. If the content is practically identical, Google may treat them as duplicates and choose one anyway. If you keep them, add real regional differences such as local contact details, pricing, examples and spelling, and annotate them with reciprocal hreflang pairs.
Why does Google ignore my hreflang tags?
The usual causes are missing return tags, a canonical pointing to a different regional page, a noindex or redirect on one of the URLs, invalid language or region codes, or relative URLs. Fix the set so every page is live, self-canonical and listed reciprocally, then check Google's selected canonical in URL Inspection.
Should I use x-default?
It is optional but recommended when you have a fallback page, such as a language selector or a general global page, for users whose language or region does not match any listed version. It does not need to match any specific language value, and it should be an indexable page that returns 200.
Is a subdirectory or a country-code domain better for international SEO?
Neither is universally better. Subdirectories share one domain's authority and cost less to run, so they suit most small and mid-sized businesses. Country-code domains give the clearest country signal and suit businesses that run each market independently and can invest in building each domain.
Turn this into a practical SEO action plan
Use RankLocalToday tools to check rankings, diagnose website issues, and prioritize the next organic traffic move.
Get your SEO plan →More in this topic: Website SEO, all 208 guides →