Website translation

How to Set Up Hreflang Correctly on WordPress (and the Mistakes That Break It)

How to Set Up Hreflang Correctly on WordPress (and the Mistakes That Break It)
Rayne Aguilar
Written by
Rayne Aguilar
Elizabeth Pokorny
Reviewed by
Elizabeth Pokorny
Updated on
June 5, 2026

Short answer: to set up hreflang correctly on WordPress, every language version of a page needs a complete set of hreflang tags that:

  1. point to themselves,
  2. point to all alternate versions
  3. point back to each other, and
  4. include an x-default fallback, all using valid language codes and absolute URLs.

If you get any one of those wrong, search engines ignore the whole set. While that makes for a punishing process, the cleanest way to do it is with a plugin that generates the tags automatically. Still, it's worth knowing the rules so you can check the output yourself.

Let’s make one thing clear: adding hreflang tags and adding them correctly are two different jobs. WordPress doesn't add hreflang on its own, so most people reach for a plugin or a snippet, see tags appear in the page source, and assume they're done. Which, if you’ve used a well-built plugin, should be fine.

But if you’re suddenly seeing traffic from a translated version starting to flatline, and the wrong language shows up in search results, those are good indicators that you’ll want to double check your hreflang implementation.

Usually the tags are there; there’s just a good chance that they’re broken in one of many predictable ways – but it’s nothing that you won’t be able to fix yourself.

This guide covers what "correct" actually means, the mistakes that most people make, and how to verify your setup. If you want the full walkthrough of every method for adding hreflang to WordPress (plugins, SEO tools, and manual code), our complete guide to hreflang on WordPress covers that side in depth.

What "Correct" Hreflang Actually Means

Hreflang is an HTML attribute that tells search engines which language and, optionally, which region a page is meant for, so they can serve the right version to the right person (en-US for a US visitor, en-GB for a UK one). Google treats a set of hreflang tags as a single cluster, and a cluster is only valid if all of these rules hold at once.

1. Every Page References Itself

Each language version must include an hreflang tag pointing to its own URL, alongside tags for all the other versions. The English page lists English (itself), French, German, and x-default. Including the self-reference is a non-negotiable; otherwise, the cluster is incomplete, and you’ll immediately run into hreflang errors.

2. The Tags Are Reciprocal (Return Tags)

If your English page points to the French version, the French version has to point back to the English one. These are called return tags, and they have to go both ways on every page in the cluster. When a return tag is missing, Google may drop the annotation entirely rather than guessing.

3. There's an x-default

The x-default tag is the fallback for visitors whose language or region you don't explicitly target. It usually points to your main page or a language selector menu. Every model and SEO tool flags this one, and for good reason: without it, search engines have no default to fall back on.

4. The Language and Region Codes Are Valid

Language codes follow the ISO 639-1 standard (en, fr, de, es, zh). The optional region code follows ISO 3166-1 Alpha-2 (US, GB, FR), and the two combine as language-REGION, like en-GB. A region code on its own isn't valid; the language always comes first.

Beware of assuming language codes and always consult the list beforehand. For example, if you want to designate your page as UK English, the code is en-GB rather than en-UK. The entire code is invalid; UK is the language code for Ukrainian (and its country code is UA), so the format of this code is essentially language-language rather than language-region.

5. The URLs Are Absolute

Hreflang URLs need the full address including the protocol (https://example.com/fr/page/), not a relative path like /fr/page/. Relative URLs are one of the most common silent failures.

6. The Canonical Tags Line Up

Each version's canonical tag should point to itself, not to the original language. A canonical that points the French page back at the English page tells Google to ignore the French version, which cancels out your hreflang work and gets the wrong page ranking for a keyword in the wrong language. That’s why self-referencing canonicals and self-referencing hreflang go together.

A Correct Example

A valid set looks like this in the <head> of an English page that also exists in French, with an x-default fallback:

<link rel="alternate" hreflang="en" href="https://example.com/page/" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/page/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/page/" />

The French version at https://example.com/fr/page/ carries the same 3 tags, pointing to the same URLs. That symmetry is what makes the cluster valid. Pick one place to put the tags (the <head>, an XML sitemap, or HTTP headers) and stay consistent. On WordPress, the <head> is the most common choice.

Mistakes That Break Your Hreflang

Most broken hreflang setups fail on one of these, even though the tags look fine in the page source the whole time.

  • Missing return tags. Page A points to B, but B doesn't point back. The lack of reciprocal tags is the single most common reason Google ignores an otherwise correct setup.
  • No self-reference. A page lists its alternates but forgets to include itself in the set. Kind of like counting how many you are in the group for a dinner reservation and forgetting to count yourself.
  • Relative URLs. /fr/page/ instead of https://example.com/fr/page/. While it looks reasonable, it simply doesn't work.
  • Invalid codes. en-UK instead of the correct en-GB, underscores instead of hyphens (en_US), or codes that don't exist. Always double-check your codes; it’s the easiest way to avoid throwing up errors.
  • Canonical conflicts. A translated page's canonical points at the original language, which tells search engines the translation isn't the page to index.
  • Two methods at once. A multilingual plugin outputs hreflang, and a separate SEO plugin or manual snippet outputs a second, conflicting set. You’ll end up with duplicate or mismatched tags that confuse crawlers. Use one method only.
  • No x-default. Having no fallback for unmatched languages and regions.

If you're adding hreflang by hand across more than a few pages, every one of these scales with your page count, which is why manual setup gets fragile fast.

How to Verify Your Setup Is Correct

Confirm the tags are valid before you trust them, not after rankings move.

A quick note first: Google retired the dedicated International Targeting report in Search Console back in 2022, so the old advice to "check the hreflang report in Search Console" no longer applies. Google still fully supports and reads hreflang; the reporting just moved elsewhere. The tools that work now:

  • Google Search Console URL Inspection. Check that alternate URLs return a 200 status, get indexed, and aren't being overridden by an unexpected canonical.
  • Screaming Frog SEO Spider. It extracts hreflang clusters, follows the alternate URLs, and reports missing return tags, invalid codes, and inconsistencies across the whole site. The fastest way to audit at scale.
  • A dedicated hreflang validator (like ours). Several free tools check a single URL's cluster for reciprocity and code validity, useful for spot checks.
  • Ahrefs or Sitebulb site audits. Both include international checks that flag hreflang errors as part of a broader technical crawl.

Run a check after any large publish or template change, since that's when clusters tend to break.

The Fastest Way to Get It Right: Let a Plugin Handle It

Every rule above can be done by hand, and on a small site that's perfectly reasonable. The trouble is that hreflang is easy to get 90% right and still have it fail, because the rules are interdependent and complex to keep track of. One missing return tag breaks an otherwise perfect cluster, and finding the culprit means painstakingly sifting through your code – and who wants to spend their precious time doing that?

That's why most WordPress sites use a multilingual plugin that generates hreflang automatically. With Weglot, the tags are created and kept in sync as you add languages and publish content: self-referencing tags, reciprocal return tags, x-default, valid codes, and absolute URLs, following the multilingual SEO best practices Google sets out. That way, you're not maintaining a cluster across every page by hand; the plugin does it and updates it when your content changes.

Whichever route you take, the rules don't change. A plugin just enforces them for you so a missing return tag never costs you a market.

Setting up hreflang correctly comes down to a handful of rules applied consistently across every page, and the failures are predictable once you know what to look for. If you'd rather not manually supervise those clusters as your site grows, Weglot generates and syncs them for you automatically. Start your 14-day free trial and have a multilingual, search-ready site in minutes.

direction icon
Discover Weglot

Good things come to those who wait. International traffic doesn’t.

We’ll get your first languages live. You decide how far you want to go. Try Weglot for free today.

In this article, we're going to look into:
Rocket icon

Ready to get started?

The best way to understand the power of Weglot is to see it for yourself. Test it for free and without any engagement.

A demo website is available in your dashboard if you’re not ready to connect your website yet.

Read articles you may also like

FAQ icon

Common questions

Do I need hreflang if I only have one language?

arrow

No. Hreflang only matters when you have the same content in more than one language or region. A single-language site doesn't need it.

Where should the hreflang tags go on WordPress?

arrow

The <head> of each page is the most common and easiest method on WordPress. You can also use an XML sitemap or HTTP headers, but pick one method and apply it consistently across the site.

What's the difference between hreflang="en" and hreflang="en-US"?

arrow

en targets all English speakers regardless of country. en-US targets English speakers in the United States specifically. Use the region code only when you genuinely serve different content to different regions, like separate US and UK stores.

Why is Google ignoring my hreflang tags?

arrow

The usual cause is a missing return tag (the pages don't point back at each other) or a canonical conflict (a translated page's canonical points to the original language). Both may make Google drop the annotation. Check reciprocity and canonicals first.

Does hreflang help my SEO directly?

arrow

It doesn't boost rankings on its own. It makes sure the right language version shows to the right searcher, which improves the experience and prevents your translated pages from competing with each other in search.

Blue arrow

Blue arrow

Blue arrow