---
title: "Self-referencing hreflang and x-default, with examples"
description: "Should a page list itself in its own hreflang set, and where should x-default point? Both answered with markup, Google's rules and five plugins' defaults."
url: "https://www.langrelay.com/blog/self-referencing-hreflang-x-default"
---

1. [Home](https://www.langrelay.com/)
2. [Blog](https://www.langrelay.com/blog)
3. Self-referencing hreflang and x-default, with examples

ArticleMultilingual SEO

# Self-referencing hreflang and x-default, with examples

Should a page list itself in its own hreflang set, and where should x-default point? Both answered with markup, Google's rules and five plugins' defaults.

[Chris Jayden](https://www.langrelay.com/about)

Founder

Published

6 October 2026

Reading time

7 min read

![Friends row to an island jetty in the midnight sun, where someone waits with a lantern on a deck of green and orange leaf tiles.](https://www.langrelay.com/_emdash/api/media/file/01M4ET7ST53XRVK6WQG63FAJ9V.webp)

On this page

1. What is a self-referencing hreflang tag?
2. Is a self-referencing hreflang required?
3. Self-reference and return links are two different rules
4. What does x-default do?
5. Where should x-default point?
6. You have a language selector page
7. Your home page redirects by language or location
8. You have neither
9. How WordPress translation plugins handle x-default
10. How LangRelay builds the set
11. How do you check both entries on a live page?

Yes, a page should list itself. Google's documentation says each language version must name itself as well as every other version, so the German page carries a `de` line that points at the German page. x-default is the one entry with no language: it names the page Google should show a searcher whose language you don't offer. Point it at a language selector if you have one, and otherwise at the version you would hand a stranger, which on most sites is the original.

WordPress translation plugins disagree about x-default. Of the five compared below, WPML and LangRelay add it to every page, Polylang only to a home page that redirects, TranslatePress behind a setting, and Weglot not at all by default.

## What is a self-referencing hreflang tag?

Take a bookshop that sells in English, German and Dutch. Its English catalogue page lives at `https://www.kestrelbooks.example/catalogue/`, and the translations sit under `/de/` and `/nl/`. This is the `<head>` of the German version:

```
<link rel="alternate" hreflang="en" href="https://www.kestrelbooks.example/catalogue/">
<link rel="alternate" hreflang="de" href="https://www.kestrelbooks.example/de/catalogue/">
<link rel="alternate" hreflang="nl" href="https://www.kestrelbooks.example/nl/catalogue/">
<link rel="alternate" hreflang="x-default" href="https://www.kestrelbooks.example/catalogue/">
```

The second line is the self-reference. It points at the URL the browser is already on, which looks redundant until you see the set as a list that belongs to the whole cluster of pages. Every version prints the same four lines, and each version finds itself somewhere in them.

The self-reference has to match the page's own address exactly. If the German page is served at `/de/catalogue/` with a trailing slash, a `de` line pointing at `/de/catalogue` without one names a different URL, and the page no longer lists itself.

## Is a self-referencing hreflang required?

Google's page on localized versions, last updated on 2026-09-21, puts it plainly in its guidelines for all three methods: "Each language version must list itself as well as all other language versions." The sitemap method repeats it: each `<url>` entry lists every alternate "including itself".

What the page does not spell out is the penalty for leaving the self line out. So treat it as a requirement and don't test the edge. There is also a practical argument. A set without self-references differs on every page, because each version has to drop a different line. A set with them is identical everywhere, which means one template or one function can print it, and the chance of one page drifting out of step drops.

If a crawler or audit tool reports "no self-referencing hreflang" on a page, print the full list on that page's template, the same list every other version prints.

## Self-reference and return links are two different rules

The rule people confuse with self-reference is the return link. Google states it separately: "If two pages don't both point to each other, the tags will be ignored." If the English catalogue names the Dutch page as its `nl` alternate, the Dutch page has to name the English one back.

A missing return link has a documented effect: Google ignores the pair. A missing self line has none documented. Both disappear when every version prints the same complete list, which is the reason to generate the set from one source of truth rather than per page.

## What does x-default do?

Google introduced the value on 10 April 2013. Pierre Far's announcement described home pages that "point visitors to localized pages, either via redirects or by changing the content to reflect the user's language", and gave x-default to them. It signals that a page "doesn't target any specific language or locale and is the default page when no other page is better suited". His examples were French-speaking searchers worldwide and English-speaking searchers on google.ca, for a site with only UK, US and Australian English pages.

The current documentation keeps that meaning in one line: x-default is "used when no other language/region matches the user's browser setting". It also widens the scope a little. You can use x-default for any page, although "it was designed for language selector pages and so it will work best with those".

Google recommends x-default for the fallback page, and its guidelines put it as "consider adding", so a set without one is still valid. Without it, a searcher in Brazil looking at the bookshop above gets whichever of the three versions Google picks on its own.

## Where should x-default point?

The answer depends on what the site does with a visitor whose language it doesn't know.

### You have a language selector page

Point x-default at the selector. This is the case the value was built for, and the selector is also where a person with no matching language would want to land.

### Your home page redirects by language or location

If `/` sends visitors on to `/de/` or `/nl/` based on their browser language or IP address, x-default goes on `/`. The 2013 post names this setup explicitly. Be aware of how Google crawls it, though. Its page on locale-adaptive pages says Googlebot does not send an `Accept-Language` header and crawls from IP addresses in the USA as well as from outside it, and it recommends separate URLs annotated with hreflang over content that changes per visitor. A redirecting `/` is fine as an entrance. The pages behind it should each have their own URL.

### You have neither

Point x-default at the version you want an unmatched searcher to see. For most sites that is the original language, so the same URL appears twice in the set, once with its language code and once as x-default. That is allowed. Yoast's hreflang guide discusses this exact case and advises keeping both lines rather than dropping the language one, because the language line still says which language the page is in, and the set is easier to read.

## How WordPress translation plugins handle x-default

The plugins that print hreflang on WordPress read the same guidance and ship different defaults. Here is what each one's documentation said on 2026-10-06:

| Plugin | x-default by default | How to change it |
| --- | --- | --- |
| WPML | Printed in the page head next to one tag per language, for visitors whose language matches none of the translations | Hreflang behaviour is set under WPML's settings for URLs, slugs and SEO |
| Polylang | Only on the home page, when that page is auto-redirected to a language home page | The `pll_rel_hreflang_attributes` filter, for example to add English as x-default on every page |
| TranslatePress | A setting in the Advanced tab, "Enable the hreflang x-default tag for language", which applies to an entire language | Turn the setting on for the language you choose |
| Weglot | Not added by default; Weglot's WordPress help says it "is not necessary for most websites" and names a language selection home page as a case where it helps | The `weglot_href_lang` filter, with a code example in the same help article |
| LangRelay | Always the original page's URL, on every page that has a set | Not configurable |

Google's text allows both a narrow and a wide reading. Polylang's and Weglot's defaults match the narrower one, the 2013 use for home pages and selectors; Polylang describes its choice only as "recommended by Google". WPML's and LangRelay's defaults match the wider one, that x-default can sit on any page. If your site has a real language selector page, the narrow reading suits you better, and LangRelay's fixed default does not, since it cannot point x-default anywhere other than the original.

## How LangRelay builds the set

LangRelay's WordPress plugin prints the hreflang set LangRelay sends for each page, without adding or removing entries. That set holds the original page under its source language, one line for every language in which the page's translation is live, and x-default on the original's URL. The plugin prints the same lines on the original and on each translated version, so every version lists itself and every other version by construction.

A page with no approved translation yet gets no set at all. Once the first translation of it goes live, the set appears with two languages and x-default, and it grows by one line as each further language is approved.

After a release, LangRelay fetches the translated URL and checks that the page's own entry is in its set and that x-default points at the original. If either check fails, LangRelay flags that page on the release.

## How do you check both entries on a live page?

Fetch the HTML the server sends, since that is what a crawler starts from:

```
curl -s https://www.kestrelbooks.example/de/catalogue/ | grep -i 'hreflang'
```

Then look for four things:

1. A line whose language is this page's language and whose `href` is exactly the URL you requested.
2. The same lines, in any order, on every other version.
3. At most one x-default, and its URL answering 200 without a redirect.
4. If x-default points at a page that redirects visitors by language, a real URL for each language behind it.

Our [hreflang guide](https://www.langrelay.com/guides/hreflang) covers the codes and the rest of the rules, and [hreflang and canonical tags](https://www.langrelay.com/blog/hreflang-and-canonical-tags) covers how the self-referencing line relates to the canonical. The set can also live in a sitemap, which [hreflang in XML sitemaps](https://www.langrelay.com/blog/hreflang-xml-sitemap) walks through, and [hreflang vs the HTML lang attribute](https://www.langrelay.com/blog/hreflang-vs-html-lang) explains why the page still needs `lang` on its `<html>` element. For the plugin side, read [hreflang in WordPress](https://www.langrelay.com/blog/hreflang-wordpress) or the [multilingual SEO](https://www.langrelay.com/multilingual-seo) overview, and if you would like to see LangRelay's output on one of your own pages, [book a demo](https://www.langrelay.com/book-a-demo).

## Sources

The pages this one cites, with the day each was read.

1. 01[Localized versions of your pages (Google Search Central, last updated 2026-09-21)](https://developers.google.com/search/docs/specialty/international/localized-versions)developers.google.com, checked 6 October 2026
2. 02[Introducing "x-default hreflang" for international landing pages (Google Search Central Blog, Pierre Far, 2013-04-10)](https://developers.google.com/search/blog/2013/04/x-default-hreflang-for-international-pages)developers.google.com, checked 6 October 2026
3. 03[Locale-adaptive pages (Google Search Central, last updated 2025-12-10)](https://developers.google.com/search/docs/specialty/international/locale-adaptive-pages)developers.google.com, checked 6 October 2026
4. 04[hreflang: the ultimate guide (Yoast, published 2022-03-01, modified 2024-08-21)](https://yoast.com/hreflang-ultimate-guide/)yoast.com, checked 6 October 2026
5. 05[How to Translate Your Site for Multilingual SEO (WPML documentation, last updated 2026-07-02)](https://wpml.org/documentation/translating-your-contents/multilingual-seo/)wpml.org, checked 6 October 2026
6. 06[Hreflang tag attributes and Polylang: everything you need to know (Polylang, 2023-02-21)](https://polylang.pro/hreflang-tag-attributes-and-polylang-everything-you-need-to-know/)polylang.pro, checked 6 October 2026
7. 07[Filter reference (Polylang documentation)](https://polylang.pro/documentation/support/developers/filter-reference/)polylang.pro, checked 6 October 2026
8. 08[Advanced Settings (TranslatePress documentation)](https://translatepress.com/docs/settings/advanced-settings/)translatepress.com, checked 6 October 2026
9. 09[WordPress: how does Weglot manage the SEO? (Weglot Help Center, last updated 2026-06-29)](https://support.weglot.com/article/99-wordpress-how-weglot-manage-the-seo)support.weglot.com, checked 6 October 2026

[Chris Jayden](https://www.langrelay.com/about)

Founder, LangRelay

Chris Jayden is the founder of LangRelay. Chris has worked on websites of every size, from large e-commerce stores to small sites with a handful of pages, and started LangRelay after years of translating them the hard way.

On this page

1. What is a self-referencing hreflang tag?
2. Is a self-referencing hreflang required?
3. Self-reference and return links are two different rules
4. What does x-default do?
5. Where should x-default point?
6. You have a language selector page
7. Your home page redirects by language or location
8. You have neither
9. How WordPress translation plugins handle x-default
10. How LangRelay builds the set
11. How do you check both entries on a live page?

Share

- [Share on LinkedIn (opens in a new tab)](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.langrelay.com%2Fblog%2Fself-referencing-hreflang-x-default)
- [Share on X (opens in a new tab)](https://x.com/intent/post?url=https%3A%2F%2Fwww.langrelay.com%2Fblog%2Fself-referencing-hreflang-x-default&amp;text=Self-referencing%20hreflang%20and%20x-default%2C%20with%20examples)

See it on your site

A 30-minute walkthrough on one of your pages.

[Book a demo](https://www.langrelay.com/book-a-demo)

- hreflang
- multilingual SEO
- x-default

## Keep reading

- Article
  ### [Hreflang vs the HTML lang attribute: what each one does](https://www.langrelay.com/blog/hreflang-vs-html-lang)
  The lang attribute says what language this page is in; hreflang points to the page in other languages. Who reads each, valid values, and both in one head.
- Article
  ### [Hreflang in WordPress: how plugins print it and how to check](https://www.langrelay.com/blog/hreflang-wordpress)
  Where hreflang comes from on WordPress, what WPML, Polylang, TranslatePress and Weglot print by default, how Yoast SEO and Rank Math fit in, and how to check.

Book a demo

## See LangRelay on your own site

Book 30 minutes with the team. We translate one of your pages live and walk through review, publishing and multilingual SEO.

[Book a demo](https://www.langrelay.com/book-a-demo)[See pricing](https://www.langrelay.com/pricing)
