Hreflang Implementation
Hreflang shipped right the first time, return-tags verified.
Hreflang for 50+ multi-market sites on Shopify Plus, custom Liquid and headless Next.js. No orphan tags, no broken return pairs.
- Automated return-tag pair verification
- Shopify Markets, Liquid, Next.js metadata
- Audit, mapping, code and monitoring in one

Trusted by ambitious brands worldwide
SEMrush agency
Rated #1 SEO agency in The Netherlands by SEMrush
100% Dedicated to SEO
SEO is all we do, and we're good at it
Most hreflang implementations are broken on day one.Orphan tags, missing self-references, wrong country codes.We ship hreflang that actually validates.
Most hreflang implementations are broken on day one. Orphan tags, missing self-references, wrong country codes. We ship hreflang that actually validates.
We have implemented hreflang on Shopify Plus stores with seven markets, custom Liquid themes with currency-routed subfolders, and headless Next.js sites using metadata.alternates.languages. Every implementation runs through Merkle hreflang tester, Screaming Frog hreflang report and an in-house return-tag verifier before we sign it off. If a country code is wrong, we catch it before Search Console does.
See multi-market casesHow we ship hreflang
Hreflang implementation in five phases
A discrete two to four week project: audit, map, decide method, implement, monitor. Every output is yours, including the automated verification script.
- 01
Audit current hreflang setup
We run Merkle hreflang tester on 25 representative URLs across your markets, then a full Screaming Frog crawl with the hreflang report turned on. We also pull the X-Default and return-tag analysis from Ahrefs Site Audit. Deliverable: hreflang audit report with every broken cluster, missing self-reference and wrong country code listed.
- 02
URL pair mapping per market and language
We build a master spreadsheet listing every URL in every market with its hreflang equivalents. For ecommerce this is templated by collection and product (one row per SKU, columns per market). We mark which pages are translated, which fall back to language-only, and which need x-default. This becomes the source-of-truth alternates map your code reads from.
- 03
Decide implementation method
HTML head tags for small sites (under 1,000 URL pairs), XML sitemap hreflang for everything bigger, HTTP Link headers for PDFs and non-HTML. We document the decision in writing with the trade-offs spelled out, so your CTO can sanity check it. We also map the decision to your CDN and caching strategy.
- 04
Implementation in your codebase
Shipped as Git PRs against your repo. Shopify Plus: theme.liquid edits plus a custom sitemap_hreflang.liquid template. Custom Liquid: a hreflang.liquid snippet rendered in head. Next.js: metadata.alternates.languages helper that reads from alternates.json. Every PR includes a test that fails the build if the cluster breaks.
- 05
Automated return-tag verification and monitoring
We deploy a daily crawler that walks the hreflang clusters, verifies return-tag pairs, and pings a Slack channel when something breaks. We also wire up GSC Index Coverage monitoring for the hreflang-tagged URLs so we catch indexing issues early. The script is yours, documented in your repo.

Hreflang done once,verified continuously.
Hreflang is not a one-time tag drop. It is a URL pair map that has to stay in sync as you add markets, retire products and translate categories. We ship the initial implementation, then leave behind an automated verification script that runs on every production deploy and pings us when a return-tag breaks. No silent decay.
What hreflang implementation actually means
Hreflang implementation, decoded for engineering and SEO teams
Hreflang is a Google signal that tells the search engine which URL variant to serve to which audience. It does not affect rankings directly. It controls which URL gets served in which market. Done right it eliminates accidental cannibalisation and wrong-market serving; done wrong it does nothing or quietly creates duplicate content issues.
Language only vs language plus country
Use language only (en, fr, de) when you have one variant per language. Use language plus country (en-US, en-GB, en-CA) when you have country-specific content, pricing or shipping. The mistake we see most: en-EU. The EU is not a country in ISO 3166-1. Use en or list each EU country code individually.
Self-reference is mandatory, not optional
Every URL in a hreflang cluster must include a hreflang tag pointing to itself. The cluster /en/, /nl/, /de/ needs each of those URLs to list all three (including itself) as hreflang alternates. Google silently drops the entire cluster when self-references are missing. This is the single most common cause of hreflang doing nothing.
x-default for unknown-market visitors
x-default tells Google which page to serve when the visitor does not match any of your listed language or country variants. Usually your English homepage or a country picker. Not strictly required by Google, but recommended for any site with three or more markets. We default to including it.
HTML head vs XML sitemap vs HTTP headers
Three valid implementation methods. HTML head is simplest but adds page weight (10 markets = 10 link tags per page). XML sitemap scales better and keeps page weight low. HTTP Link headers are for non-HTML resources (PDFs, images you want indexed by language). Pick one method and stay consistent.
Shopify Markets vs custom implementation
Shopify Markets auto-generates hreflang but only for the primary domain pattern and only for translated pages, not all market variants. For full coverage we override the auto-generation with custom Liquid in theme.liquid and ship a custom sitemap_hreflang.liquid. Markets handles currency and routing; we handle hreflang.
Next.js hreflang via metadata.alternates
Next.js 13+ App Router supports hreflang natively via the metadata.alternates.languages object exported from layout.tsx or page.tsx. We populate it from a single alternates.json so the URL pair map lives in one place. The build emits clean link tags in the head. Pages router uses next-intl or a custom Head component.
Why LASEO vs alternatives
Hreflang implementation compared honestly
DIY, SEO plugins and generalist agencies all attempt hreflang. Here is what typically goes wrong and what we do differently.
Plugins, partial coverage, silent decay
- DIY implementations almost always forget self-references. Yoast and RankMath plugins emit them inconsistently. Google then ignores the entire cluster.
- Manual check at launch, then forgotten. URL changes silently orphan tags over time. No alerting when a cluster breaks.
- SEO plugins typically emit hreflang for homepage and main collections only. Product pages, blog posts and category filters left without hreflang.
- en-UK, en-EU, zh (without script tag), pt without country split. Wrong codes silently ignored by Google.
- Default Shopify Markets hreflang is partial and limited to translated content. Untranslated market variants get no hreflang.
- Implementation document, often outdated within a quarter. No tooling for future market additions. Knowledge lives in one person's head.
Mapped, validated, continuously verified
- Self-references are part of the URL pair map by default. Cypress or Playwright test fails the build if any cluster lacks self-references.
- Automated daily crawler verifies every return-tag pair. Slack alert when a cluster breaks. Repaired before next deploy.
- Full coverage: homepage, collections, products, blog posts, custom landing pages. URL pair map includes every indexable page across every market.
- Every code validated against ISO 639-1 (language) and ISO 3166-1 Alpha 2 (country) before deploy. zh-Hans vs zh-Hant for script-aware locales.
- Hybrid setup: Markets for routing and currency, custom Liquid in theme.liquid for the actual hreflang tags. Full coverage of all market variants.
- Documented playbook in your Notion. Verification script in your repo. Cypress or Playwright test in your CI. Your team can add a market without us.
Topical cluster
Related services in this pillar
← Back to pillar: Technical SEOMobile SEO
Mobile-first indexing has been Google's default since 2024. Your mobile UX is your SEO. We test on real device
Site Speed
We get LCP under 2.5s, INP under 200ms, CLS under 0.1 in field data. Fixed in your codebase, measured in CrUX.
Core Web Vitals
LCP, INP and CLS fixed at the root cause. CrUX field data baseline, code-level PRs, monthly RUM scorecard. Not
Website Migration
40+ migrations shipped. Magento, Shopify, WordPress, Next.js, Webflow. URL mapping, redirect QA, live cutover
Multi-market work at scale
Hreflang implementations that unlocked the right markets
What our hreflang clients say
Multi-market site owners in their own words
Our previous agency told us our hreflang was fine. LASEO ran a Merkle test on 25 URLs and 22 of them had broken clusters. Two weeks later every cluster was whole, the German pages stopped outranking the Dutch in google.nl, and our return-tag verifier still pings us when anything breaks.
We had Shopify Markets running across seven markets and the auto-generated hreflang only covered translated pages. LASEO shipped a hybrid setup with custom Liquid for the hreflang and Markets for everything else. Full coverage in eleven days.
The Playwright test they added catches hreflang regressions before they reach production. We had a release in March that would have broken our en-CA cluster and the build failed in CI. That alone paid back the engagement.
Our previous agency told us our hreflang was fine. LASEO ran a Merkle test on 25 URLs and 22 of them had broken clusters. Two weeks later every cluster was whole, the German pages stopped outranking the Dutch in google.nl, and our return-tag verifier still pings us when anything breaks.
We had Shopify Markets running across seven markets and the auto-generated hreflang only covered translated pages. LASEO shipped a hybrid setup with custom Liquid for the hreflang and Markets for everything else. Full coverage in eleven days.
The Playwright test they added catches hreflang regressions before they reach production. We had a release in March that would have broken our en-CA cluster and the build failed in CI. That alone paid back the engagement.
Honest answers about hreflang implementation 
What engineering teams and SEO leads ask before committing to a hreflang project.

Start by running Merkle hreflang tester (technicalseo.com) on 25 representative URLs spanning your homepage, top collections and top products. Then run a Screaming Frog crawl with the hreflang report enabled to find every broken cluster. The three most common errors are missing self-references (every URL in a cluster must reference itself), broken return-tag pairs (page A references page B but page B does not reference A back), and wrong country codes (en-UK is invalid, use en-GB). Fix in your codebase rather than your CMS plugin so the change persists across plugin updates. Add a Cypress or Playwright test that fails the build when self-references are missing. Then set up a daily crawl that monitors the clusters going forward.

Hreflang implementation call
Bring a broken hreflang setupto a senior implementer.
30 minutes with a LASEO senior consultant. We will run a quick Merkle test on five of your URLs live during the call, tell you exactly which clusters are broken, and scope the implementation if you want us to fix them.












