Hreflang Generator

Create reciprocal-ready alternate-language link tags from language and URL pairs.

Your workspace

Processed in your browser

Your entries

Entry 1
Entry 2
Entry 3

3 entries

Import or copy multiple entries

Review the example or enter your values.

This tool generates the necessary HTML link tags to inform search engines about alternate language versions of your content. By providing a list of language codes and their corresponding URLs, you create the reciprocal relationships required to prevent duplicate content issues and ensure users land on the correct regional version.

How to generate hreflang tags

  1. Enter your language codes (e.g., 'en', 'fr') and their corresponding absolute URLs in the input area, using one pair per line.
  2. Copy the generated output and place these <link> tags within the <head> section of every page listed in your input to establish full reciprocity.

Understanding reciprocity

Search engines require hreflang tags to be reciprocal. This means if Page A points to Page B as an alternate, Page B must also point back to Page A. This tool generates the full set of tags for every URL provided, ensuring that each page includes a self-reference and pointers to all other language versions in the set.

Input and output format

en,https://example.com/ fr,https://example.com/fr/

<link rel="alternate" hreflang="en" href="https://example.com/"> <link rel="alternate" hreflang="fr" href="https://example.com/fr/">

Questions about hreflang implementation

What is the 'x-default' tag used for?

The 'x-default' hreflang value is used to specify a fallback page for users whose language or region does not match any of your other specified versions.

Do I need to include the current page in the list?

Yes, every page in your hreflang set must include a self-referencing tag, along with tags for all other alternate versions.

Continue your workflow

Explore more tools in this category for your next step.