Türk SEM · SEO Tool

hreflang Tag Generator

Generate the correct hreflang tags for your multilingual, multi-region site in seconds: an HTML <head> block, an XML sitemap fragment, x-default and live validation.

Quick build

Choose the base address and the languages, and we will fill the rows in for you. You can edit them afterwards.

URL structure
Languages

Language ↔ URL rows

3 valid

The address of each language version. This block goes into the <head> of every version, exactly as it is (each page lists itself too).

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

Implementation notes

  • Add the tags to the <head> of every language version in exactly the same way (reciprocity is required).
  • Every page also lists itself (self-reference).
  • URLs must be absolute; a mismatch with a redirect or canonical invalidates the hreflang.
  • Use only one of HTML, XML sitemap and HTTP header, consistently.

Test it once it is live

After you publish, check reciprocity and self-reference with our Hreflang Checker.

Hreflang Checker →

Frequently asked questions

What is hreflang and what does it do?

hreflang is a tag that tells search engines which versions of a page exist for different languages or regions. Set up correctly, Google shows the German version to a user in Germany and the Turkish version to a user in Turkey, which reduces the risk of ranking in the wrong language and of duplicate content.

Where should I add the tags?

Pick one of three methods and use it consistently: (1) link tags in the <head> of every page, (2) xhtml:link alternates inside the XML sitemap, (3) an HTTP response header (for non-HTML files such as PDFs). This tool generates the first two.

What does x-default mean, and should I add it?

x-default names the fallback page for users who match none of the languages you have defined, usually a language selector or your main language. It is recommended, and this tool lets you add the x-default row with a single click.

What is the most common hreflang mistake?

Missing reciprocity. If page A lists B as an alternate, B has to list A as well, and every page must also list itself (self-reference). That is why the block we generate goes into the head of every version exactly as it is. The other common mistake is using relative URLs instead of absolute ones.

What is the difference between de-DE and de?

"de" targets the language only (German), while "de-DE" targets language plus region (German as used in Germany). Use region codes if you serve different content for the same language in different countries (de-DE, de-CH, de-AT); if you have a single German version, plain "de" is enough.

How do I test the hreflang I have set up?

Once your versions are live, run your address through our Hreflang Checker; it reports missing reciprocity, invalid codes and self-reference problems.