Skip to content

Contact LV

lv@dablock.com

Juan Lago (LV) uses your details to reply to enquiries (legitimate interest), fulfil a contract with you, or take steps you request before entering one. Privacy and your rights

Hreflang Tag Generator for English and Spanish Pages

Enter the fully qualified URLs of the equivalent English and Spanish pages. This EN/ES generator produces the same alternate-link set for both, including each page itself. An optional x-default identifies the fallback version for unmatched language or region settings.

In this guide

A language switcher helps a person navigate; hreflang supplies a machine-readable relationship between equivalent pages. Both depend on choosing the correct counterpart. A Spanish article should point to its English equivalent, not a general English listing that happens to be nearby in the site navigation.

Generate EN/ES alternate tags

Files and pasted content are processed in this browser.

The same set includes both pages. Add it to the head of each counterpart. This generator does not visit the pages or check their canonical tags.

Choose equivalents before generating tags

An alternate group represents versions of the same content for different languages or regions. A missing translation is not solved by pairing the page with an unrelated home page. Stable translated slugs can differ completely; the relationship comes from the explicit URLs rather than from matching the last part of each path.

This generator uses generic en and es for English and Spanish. Regional variants such as en-GB and es-MX describe a different targeting decision and are outside this two-language form. A region on its own does not replace a language. The linked Google reference covers larger groups when a site needs more versions.

The same set belongs on every version

Google asks each language version to list itself and the other versions. The destination URLs must be fully qualified, including the scheme. A complete generated group therefore includes both self and counterpart links. Copying only the other language’s line omits part of the intended relationship.

Reciprocity exists on the deployed pages, not inside the generator. If one page points to another that does not point back, Google documents that the annotation can be ignored. A local output can make the set consistent, but it cannot prove that every template, header, or published page contains that output.

Each language version lists itself and the other versions, with fully qualified URLs; x-default names the fallback. The paths are an illustration.

x-default and canonical links have separate roles

x-default is a fallback for language or region settings not otherwise matched. It can point to a language selector or an appropriate default version. A canonical link expresses a preferred URL for a page; it is not created by renaming an alternate link. A translated version should not be collapsed into the source language merely because both discuss the same subject.

HTML output and the published relationship

The HTML belongs in the document head. Google also supports HTTP-header and sitemap implementations; its documentation treats the three methods as equivalent rather than requiring all three. After choosing a method, the useful evidence is the actual page or response carrying the complete group. The generated group provides the explicit URL relationships for that installation.

Common questions

Should I use the same tags on EN and ES pages?

For one equivalent-page group, yes: each version lists itself and the other versions, using the same complete set.

Can this check the tags already on my live pages?

No. It builds and checks the supplied map. Live HTML, HTTP responses and reciprocal installation need a separate inspection.

Does x-default mean the page has no language?

No. It identifies the fallback for unmatched settings. That page can still have content in a specific language.

Sources and method

The generated EN/ES HTML follows Google Search Central’s alternate-page guidelines. Local checks inspect supplied URLs; they do not fetch reciprocal live tags.

Sources checked on .

  1. Google Search Central: Localized page versionsdevelopers.google.com
  2. Google Search Central: x-defaultdevelopers.google.com
  3. Google Search Central: Multilingual sitesdevelopers.google.com
Explore all resources