A self-referencing hreflang tag is the hreflang line on a page that points to that same page. Google’s documentation says each language version “must list itself as well as all other language versions”, so the self-reference is not optional: without it, the set of tags on that page is incomplete and Google may ignore it.
If your English page lists French and German but forgets English, you have the most common hreflang mistake there is. This guide shows what a correct self-reference looks like, how it fits with canonical tags and x-default, and how to check a live site in five minutes.
Key takeaways
- Every page in a language group lists all versions, including itself. The self-referencing line is the one whose URL matches the page you are on.
- The self-referencing URL must be the page’s final canonical URL: fully qualified,
https://, no redirect, same trailing-slash rule as the canonical tag. - Hreflang only works when pages link back to each other. The self-reference is what makes the set identical on every page in the group.
- Add
x-defaultfor visitors whose language you don’t serve. It does not replace the self-reference. - Check with “View source” or your crawler of choice: the page’s own URL should appear once in its hreflang set, and match its canonical exactly.
What a self-referencing hreflang tag looks like
Take a page that exists in English, Spanish and French. The English page’s <head> should contain:
<link rel="canonical" href="https://example.com/pricing/" />
<link rel="alternate" hreflang="en" href="https://example.com/pricing/" />
<link rel="alternate" hreflang="es" href="https://example.com/es/pricing/" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/pricing/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/pricing/" />The second line is the self-reference. It is the English page telling search engines, “I am the English version of this group.”
Now the Spanish page:
<link rel="canonical" href="https://example.com/es/pricing/" />
<link rel="alternate" hreflang="en" href="https://example.com/pricing/" />
<link rel="alternate" hreflang="es" href="https://example.com/es/pricing/" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/pricing/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/pricing/" />Notice that the hreflang lines are identical on both pages. Only the canonical changes. That is the easiest way to think about it: one list, copied to every page in the group, and each page finds itself in that list.
Why Google needs the page to list itself
Hreflang is a set of claims that two or more pages are translations of each other. Google does not trust a one-way claim. Its documentation on localized versions explains why: “If two pages don’t both point to each other, the tags will be ignored. This is so that someone on another site can’t arbitrarily create a tag naming itself as an alternative version of one of your pages.”
The same page states the rule this article is about: “Each language version must list itself as well as all other language versions.”
In practice, a missing self-reference causes three problems:
- The group is inconsistent. The English page lists {es, fr}, the Spanish page lists {en, es, fr}. Tools report this as a missing return link, and Google has to guess.
- The wrong version can rank. When the clusters don’t agree, Google may show the English URL to searchers in Spain, or the other way round.
- Debugging gets harder. With a self-reference on every page, you can check any page in isolation: its own URL must be in its own list. Without one, you have to compare pages against each other.
Self-referencing hreflang and canonical tags
This is where most real-world errors come from. The hreflang self-reference and the canonical tag should point to the same URL.
Google’s guidance on consolidating duplicate URLs says: “If you’re using hreflang elements, make sure to specify a canonical page in the same language, or the best possible substitute language if a canonical page doesn’t exist for the same language.”
So:
- Do:
/es/pricing/has a canonical of/es/pricing/and a self-referencing hreflang of/es/pricing/. - Don’t:
/es/pricing/has a canonical pointing to the English/pricing/. That tells Google the Spanish page is a duplicate of the English one, and the Spanish URL can drop out of the index even though its hreflang is perfect.
Small differences count too. If the canonical is https://example.com/es/pricing/ and the hreflang self-reference is https://example.com/es/pricing (no trailing slash), the two URLs are not the same. One of them redirects, and Google has to resolve the conflict for you.
Rules for the self-referencing URL
Google’s localized-versions page lists the formatting rules. For the self-reference, these four matter most:
| Rule | Correct | Wrong |
|---|---|---|
| Fully qualified | https://example.com/fr/ | /fr/ or //example.com/fr/ |
| Final URL, no redirect | https://www.example.com/fr/ (the live URL) | http://example.com/fr (redirects twice) |
| Valid language code | fr, fr-CA, pt-BR | fr-FR-ca, uk for the United Kingdom (uk is Ukrainian) |
| Matches canonical | same string as rel="canonical" | canonical on one host, hreflang on another |
Google states the first rule directly: “Alternate URLs must be fully-qualified, including the transport method (http/https).” For language and region codes, our hreflang language codes list has the full table.
Where x-default fits
x-default is a separate line, not a substitute for the self-reference. Google describes it as the value “used when no other language/region matches the user’s browser setting.”
A common and valid pattern is to point x-default at your source-language page or at a language picker. That means the English page often has two lines with the same URL: hreflang="en" and hreflang="x-default". That is fine. They answer different questions: “which page is English?” and “which page is the fallback?”
The same rule in XML sitemaps and HTTP headers
Google supports three ways to publish hreflang: HTML <link> tags, HTTP headers, and XML sitemaps. The self-reference rule applies to all three.
In a sitemap, each <url> entry repeats the full set, including a line for its own <loc>:
<url>
<loc>https://example.com/es/pricing/</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://example.com/pricing/" />
<xhtml:link rel="alternate" hreflang="es" href="https://example.com/es/pricing/" />
<xhtml:link rel="alternate" hreflang="fr" href="https://example.com/fr/pricing/" />
<xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/pricing/" />
</url>For PDFs and other non-HTML files, use the Link: HTTP header. Pick one method per page type. Publishing the same set in two places is allowed, but if they disagree you have created a new problem.
How to check self-referencing hreflang on your site
You don’t need a paid tool to test a handful of pages.
- Open a translated page and view its source. Search for
hreflang. Confirm you see a line whosehrefis exactly the URL in your address bar. - Compare it with the canonical. Search for
rel="canonical". The two URLs should be identical, character for character. - Open each alternate URL. Each should load with a 200 status (no redirect) and show the same list of hreflang lines.
- Check the language code. The code on the self-reference should match the language the visitor actually reads on that page.
- Scale up with a crawler. Any SEO crawler that reports “missing return links” or “missing self-reference” will run these checks across the whole site.
If you use JavaScript to add hreflang after the page loads, also test with the URL Inspection tool in Search Console to see the rendered HTML Google gets. Tags that exist only in the browser are harder to rely on than tags in the server response.
Common mistakes and how to fix them
The page lists every language except its own. Usually a template bug: the code loops over “other languages” instead of “all languages”. Fix the loop so the current language is included.
The self-reference uses a different host. For example, hreflang on example.com but the site lives on www.example.com. Use the host your canonical uses.
Canonical points to the source language. Every translated page should be canonical to itself. See the section above.
Parameters and tracking codes. https://example.com/es/?utm_source=newsletter is a different URL. Self-references and canonicals should use the clean URL.
Only some pages are translated. If a page has no French version, it should not list a French URL. Listing a URL that 404s or redirects to the homepage breaks the group.
For a wider troubleshooting list, see how to fix “no hreflang tags” problems, and for the full implementation walkthrough, our complete hreflang guide.
How ConveyThis handles self-referencing hreflang
If you translate your site with ConveyThis and use the sub-directory (example.com/fr/) or sub-domain (fr.example.com) URL structure, the hreflang set is added for you, including the self-reference on every language version. Our help article on sub-domains vs. sub-directories explains which structure fits your platform; both are available on the Business plan and above (see pricing).
What ConveyThis does not decide for you is your canonical strategy on the source site. If your original pages already have canonicals pointing somewhere unexpected, fix those first, then run the checks above on one translated page. The multilingual SEO features page covers what else is added automatically, such as translated meta titles and descriptions.
FAQ
Is a self-referencing hreflang tag required? Google’s documentation says each language version must list itself as well as all other versions. Treat it as required.
Can the self-reference and x-default use the same URL? Yes. Your source-language page can be both hreflang="en" and hreflang="x-default".
Does a self-referencing hreflang replace a self-referencing canonical? No. They do different jobs. The canonical says “this is the main URL for this content”, the hreflang says “this is the English member of a language group”. Use both, pointing at the same URL.
What if a page has only one language? Then it has no alternates and needs no hreflang at all. A single self-reference on a one-language page adds nothing.
Want the hreflang set generated for every translated page, self-reference included? Create a ConveyThis account and choose the sub-directory or sub-domain URL structure during setup.