ShipworkSite inspection
Hreflang builder

Crawlability

PaginationAre paginated pages set up right?Internal searchIs site search eating crawl budget?URL parametersAre parameters creating duplicates?Log analyserWhat does Googlebot actually crawl?Robots builderNeed a robots.txt file?Soft 404sAre pages “not found” but returning 200?JavaScriptCan crawlers see it without running JS?FreshnessIs my site quietly going stale?Robots.txtDoes robots.txt say what I think?

Indexing

Sitemap lastmodAre my sitemap dates valid?SitemapIs my sitemap actually fetchable?IndexingIs Google allowed to index my pages?CanonicalsIs Google indexing the wrong URL?Index signalsDo sitemap and index signals agree?Sitemap generatorNeed a sitemap.xml for my site?Bulk URL statusWhere does each of these URLs really land?Redirect builderNeed the redirect rules?RedirectsAre my URLs answering directly, over HTTPS?

On-page

Keyword ideasWhat are people searching for?SERP previewHow does my page look in Google?Content qualityAre your pages too thin or too alike?Image weightAre images slowing the page?CannibalizationAre pages competing with each other?On-page checkDoes the page use its target phrase?ImagesAre my images accessible and loading?Meta tag builderWhat should my title and share tags say?DuplicatesDo my pages compete for one query?

Links

Orphan pagesWhich pages can no link reach?Link graphHow deep do your pages sit?Anchor textDo links say what they point at?Outbound linksAre external links still alive?Broken linksAre internal links sending visitors nowhere?

Structured data

Rich resultsIs my markup eligible for a rich result?Structured dataIs my product schema valid?Schema coverageDo my key pages carry structured data?Social previewHow does my page look when shared?Schema vs pageDoes markup match the page price?Schema builderNeed valid JSON-LD?

International

Hreflang sitemapDo page and sitemap hreflang agree?HreflangDo my language versions link back?Hreflang builderNeed the hreflang tags?Page DoctorWhy is this page not doing well?Redirect planMy site has dead links — what redirects do I write?Sitemap diffIs anything missing from my sitemap?Robots simulatorWhat does my robots.txt actually block?Can Googlebot?Can Googlebot fetch this URL?
Every error, explainedGuides
Pricing Learn Error guides Run free audit

+1 free check

Welcome to Shipwork

Sign in free and your next check this month is on us.

Continue with GoogleContinue with email

We email you a 6-digit code. No password.

No card needed. Reports and watches follow you to any device.

Generate your hreflang tags

One line per version: the language or region code, then the URL. This sitemap hreflang generator produces the <link> block for your page head and the sitemap entries, and adds x-default for you.

Runs in your browser. Nothing is sent anywhere.

How to use it

Paste the output into the <head> of every version (the block must be identical on each, including a self-reference), or into each <url> entry of your sitemap. Then run the hreflang check to confirm every version links back.

See a complete two-page hreflang sitemap example and the checks to make before publishing.

Sitemap hreflang generator: two-language example

For equivalent English and German pages, enter en https://example.com/en/shirt and de https://example.com/de/shirt on separate lines. If the English page is also the appropriate fallback, add x-default https://example.com/en/shirt explicitly. The hreflang builder uses that set for both output formats; choose the sitemap output when your publishing process maintains alternates there.

The generated fragment starts with the first page's <loc>https://example.com/en/shirt</loc> and includes an alternate such as <xhtml:link rel="alternate" hreflang="de" href="https://example.com/de/shirt"/>, alongside the English and fallback entries. This is a URL fragment, not a complete sitemap. The enclosing <urlset> must declare xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" and xmlns:xhtml="http://www.w3.org/1999/xhtml".

Create a second <url> record whose <loc> is the German URL and repeat the identical alternate set under it. Every language page needs its own record, including references to itself and the other versions. Check that the destinations are equivalent live pages, publish the complete sitemap, then use hreflang sitemap check to inspect the declarations. Do not paste the single generated fragment as though it covers every language URL.

What the hreflang generator produces

Enter one language or language-region code and URL per line, with at least two versions. The browser form produces two formats from those inputs: link rel=alternate tags for a page head, and an xhtml:link block inside one sitemap URL entry. If you did not enter an x-default row, the generator adds one pointing to the first URL you entered. It also lets you copy or download the outputs.

The generator does not fetch URLs, validate language codes, check redirects, compare page content or test reciprocity. It accepts the text you provide and writes the corresponding attributes. The generated sitemap output is one <url> entry for the first URL with alternates; you must create corresponding entries for the rest of the URL set in a real sitemap.

How to read the two output formats

The head version is a set of &lt;link rel="alternate" hreflang="en-US" href="https://example.com/us/" /&gt; tags. Place equivalent alternate declarations on each version, including a reference to itself. The sitemap version places language alternates under an &lt;xhtml:link&gt; element inside a page's &lt;url&gt; record. Pick one implementation method for the cluster or keep both synchronized; mismatched sets are difficult to maintain.

If x-default is omitted, the generated fallback points to the first input URL. That is a convenience, not a decision about the right default experience. Choose a URL that genuinely serves as a language or region fallback, such as a selector or a broadly suitable landing page. Review the output before copying it into production.

Common hreflang errors

A common issue is using a country code alone when a language code is needed, or swapping the order in a language-region value. Hreflang values use language tags such as en, en-US or fr-CA; URLs must be absolute and point to the intended equivalent page. The form does not validate those values, so compare them with Google's current language and region guidance before deployment.

Another frequent error is publishing the set on only one version. Search engines expect each page in the group to identify the other alternates and itself. Dead URLs, redirects to unrelated pages, missing return references, duplicate codes and a fallback pointed at the wrong market all weaken the cluster. The generator can produce repeated or incorrect inputs without warning because it is not a URL validator.

Steps to deploy the tags safely

First list the real equivalent URLs and their intended language or region. Use one line per version, for example en-GB https://example.com/uk/ and de-DE https://example.com/de/. Generate both outputs, decide whether the first URL is a sensible x-default, and copy only the format your implementation will maintain.

Add the page tags to every localized page template or add the sitemap entries to every relevant URL record. Verify that each URL returns the intended page and that the rendered or raw source contains the correct alternates. Run hreflang check for reciprocal page-tag inspection and hreflang sitemap check when you need to compare page and sitemap declarations. Fix the source template or sitemap generator, not only one output file, if future builds overwrite your changes.

When to use hreflang and related checks

Hreflang is useful when you publish equivalent content for different languages or regional audiences. It helps search engines understand the relationship between those versions; it does not translate content, guarantee a chosen result, or replace localized URLs. If you only have one language and no regional alternatives, adding self-only tags is usually unnecessary.

Use the generator to form the initial tags or sitemap block. Use hreflang checker after publication to inspect declared alternates and sampled return links. If the page version and sitemap disagree, run hreflang sitemap check. If your issue is a particular missing return link, see the reciprocal hreflang fix.

Questions

What is hreflang?
A tag that tells search engines which language or region a page is for, so the right version is shown to the right audience. It only applies to sites with more than one language or region.
Do I need x-default?
Yes, add one. It is the fallback for visitors whose language and region match none of your versions. This generator adds it for you if you leave the field blank.
Page tags or sitemap entries?
Either works; page tags are more common. Do not use both inconsistently. This tool outputs both so you can pick.
Must hreflang be reciprocal?
Yes. Every version must link to the others, including itself. A one-way hreflang is ignored. Use the hreflang check to confirm reciprocity.
Which sitemap file do the entries go in?
Put the entry in the sitemap that already lists that page, or a dedicated sitemap included in your sitemap index. The xhtml:link alternates must sit inside the same URL element as the page they describe.
How do I generate hreflang tags for multiple languages?
Enter each language or language-region code followed by its absolute page URL, one version per line. Generate the head tags or sitemap entry, then publish an equivalent alternate set on every page in the cluster or in each sitemap URL record. The tool does not fetch URLs or validate reciprocity, so run a check after deployment.
Does the hreflang generator validate language codes?
No. It parses each line into a code and URL and outputs both formats. It does not confirm that a code is a valid language-region tag, that the URL exists, or that the page is the correct translation. Review every input against current language-tag conventions and test each destination before publishing.
What does x-default do in the generated tags?
It identifies a fallback URL for users whose language or region does not match one of the declared alternatives. If you omit it, this generator points x-default to the first URL entered. Change that choice when the first page is not actually your suitable fallback, such as when it is specific to one market.
Should hreflang go in the page head or sitemap?
Both are supported implementation approaches. This generator outputs both so you can choose; maintaining equivalent declarations in multiple places adds synchronization work. Select the method your CMS or sitemap process can keep accurate, and check that all language versions use the same alternate set.
Why must hreflang links point back to every language version?
Reciprocal references help search engines confirm that the pages belong to one alternate-language cluster. A one-way link, dead destination or missing self-reference can make the set unreliable. The generator only creates output from your input rows; use the hreflang checker on live pages to inspect return links after publication.