Generate hreflang link attribute markup for multilingual websites. All equivalent pages must link to each other (bidirectional linking).
Language must be ISO 639-1 (lowercase). Region is optional and must be
ISO 3166-1 Alpha 2 (uppercase). Example: en-US, en, x-default.
| Domain/URL | Language | Region (optional) | x-default | Actions |
|---|
Please add this code into the <head> of each page listed in the href attributes.
Hreflang tells search engines which language or regional version of a page should be shown to a user. It prevents duplicate content issues across similar pages and improves local relevance.
When you define the relationship clearly, search engines are more likely to surface the correct version based on location and language.
Add hreflang tags inside the <head> section of each equivalent page. Each page must reference all other equivalents, including itself.
For CMS sites, place the tags in a shared header template for consistency.
Use language-REGION with ISO codes. Language is lowercase ISO 639-1, region is uppercase ISO 3166-1 Alpha-2.
Example: <link rel="alternate" hreflang="it-IT" href="https://www.digiforbiz.com/" />
1) List all equivalent URLs. 2) Define language and region. 3) Generate tags. 4) Paste into each page head. 5) Validate all pages include the full set.
language-REGION).Hreflang does not replace canonical tags. Canonical tags indicate preferred indexing, hreflang indicates language alternatives.
Use x-default for a global fallback page (language selector or neutral landing page). Include it in every equivalent set.
Maintain a single source of truth for locale mappings. Automate output and audit regularly for missing tags or broken URLs.