ads.txt Generator
Write a valid ads.txt so your ad inventory is not spoofed.
Build the hreflang set for a page, with return links checked.
One per line as code | URL. Language is ISO 639-1, region is ISO 3166-1 Alpha 2 — so en-GB, never en-UK.
Where a visitor lands when none of the versions match their language.
Used to check the self-reference. Every version must list itself.
Your generated code appears here.
The Hreflang Tag Generator builds the full set of language and region tags for a page, including the self-reference every version needs and the x-default that catches everyone else. It validates the codes against ISO 639-1 and ISO 3166-1 — catching en-UK, the single most common hreflang error — and outputs both the HTML and XML sitemap forms.
List each language version of a page with its URL and the generator writes the full hreflang set — including the self-reference every page in the group needs, and the x-default entry that catches everyone the group does not cover. The XML sitemap form is produced alongside the HTML one.
Hreflang is unusually unforgiving, and almost all of the failures are one of four things. The codes must be ISO 639-1 for language and ISO 3166-1 Alpha 2 for region, written as en-GB — not en-UK, which is not a country code, and not en_GB with an underscore. Every page in the group must list every other page including itself, so a set of five languages means five tags on each of five pages. The URLs must be absolute. And the return links must be reciprocal: if A points at B but B does not point back at A, Google discards the pair. All four are checked here.
en-UK, en_GB and invented regions are caught before they reach a live page, where they simply fail silently.
Every page must list itself. The generator adds that automatically rather than leaving it to memory.
The fallback entry is generated properly, pointing wherever unmatched visitors should land.
HTML link tags for the head, or the xhtml:link form for an XML sitemap, from the same list.
The panel shows exactly which tags need to appear on which page, which is the part that gets skipped.
One per line as "en-GB | https://example.com/page", covering every language version of this page.
Point it at the version people land on when none of the others match — usually a selector or the English page.
Invalid combinations like en-UK are flagged, along with duplicates and missing self-references.
Take the link tags for the head, or the xhtml:link form for an XML sitemap.
Because UK is not the ISO 3166-1 country code for the United Kingdom — GB is. hreflang takes ISO 639-1 for language and ISO 3166-1 Alpha 2 for region, so it is en-GB. en-UK is the single most common hreflang error and it invalidates the tag entirely.
Yes, including itself. hreflang annotations are bidirectional: if the German page does not link back to the English one, Google drops the relationship. Five language versions means five tags on each of the five pages.
It names the page to show a visitor whose language and region match none of your versions. A language selector page is the classic use, but pointing it at your primary language version is fine and more common.
Either works and you should pick one. The sitemap form is easier to maintain for a large site because it is generated rather than templated, and it keeps the head light. This tool outputs both so you can compare them.
What people who use the Hreflang Tag Generator think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the Hreflang Tag Generator. It takes half a minute and no account.
Write the first reviewWrite a valid ads.txt so your ad inventory is not spoofed.
Strip comments and dead whitespace out of a page.
See what your file actually weighs once it is compressed.
Estimate the traffic a ranking position is actually worth.
VideoObject markup with duration, thumbnail and key moments.
Decode tagged links and check the campaign naming holds together.
Check which URLs your robots.txt actually allows and blocks.
Cross three lists of words into every combination.