rel="alternate"
The `rel="alternate"` HTML link attribute identifies an alternative version of the current page, commonly used with hreflang for multilingual sites and with media queries for mobile-specific URLs.
The `rel="alternate"` attribute has three primary uses: with `hreflang` for language/region variants (`<link rel="alternate" hreflang="fr" href="/fr/page">`), with `type` for alternate formats (`<link rel="alternate" type="application/rss+xml" href="/feed.xml">`), and with `media` for device-specific versions.
For multilingual sites, every page must have a complete set of `rel="alternate" hreflang` tags pointing to all language versions, including a self-referencing tag. Missing or asymmetric annotations cause Google to ignore them entirely.
In Next.js App Router, configure alternate links via `metadata.alternates`. For RSS feeds, canonical URLs, and language variants, this is the cleanest approach. Indxel validates that alternate links are properly configured and reciprocal.
Example
// Next.js App Router — alternates configuration
export const metadata = {
alternates: {
canonical: "https://indxel.com/glossary/rel-alternate",
languages: {
"en": "https://indxel.com/en/glossary/rel-alternate",
"fr": "https://indxel.com/fr/glossary/rel-alternate",
},
types: {
"application/rss+xml": "https://indxel.com/feed.xml",
},
},
};Related terms
Hreflang
Hreflang is an HTML attribute that specifies the language and optional geographic targeting of a page, helping search engines serve the correct version to users in different regions.
Canonical URL
A canonical URL is an HTML link element that tells search engines which URL is the preferred version of a page, consolidating ranking signals when multiple URLs serve similar content.
Robots Meta Tag
The robots meta tag is an HTML element in the `<head>` that provides page-level instructions to search engine crawlers about indexing and link-following behavior.
Stop shipping broken SEO
Indxel validates your metadata, guards your CI/CD pipeline, and monitors indexation — so you never miss an SEO issue again.