cd /news/developer-tools/feed-discovery-with-rel-alternate · home topics developer-tools article
[ARTICLE · art-33241] src=specification.website ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Feed discovery with rel="alternate"

Websites should announce RSS, Atom, or JSON feeds using <link rel="alternate"> in the <head> to enable automatic discovery by feed readers, browsers, and AI agents. The practice improves subscription rates and ensures machine-readable versions are easily found.

read3 min views1 publishedJun 18, 2026

If your site publishes a feed — RSS, Atom, or JSON Feed — announce it in <head> with <link rel="alternate">. Feed readers, agents, and browsers discover it without guessing the URL.

What it is #

<link rel="alternate">

in <head>

declares an alternative representation of the current page or site — most commonly a syndication feed, but also a translated version, a print stylesheet, or, increasingly, the page’s Markdown source. Feed readers, browsers, and a growing number of AI agents look for these links to subscribe, switch language, or fetch a machine-friendly version.

For feeds specifically:

<head>
  <link rel="alternate" type="application/rss+xml"
        title="Example — Posts" href="/feed.xml">
  <link rel="alternate" type="application/atom+xml"
        title="Example — Posts (Atom)" href="/atom.xml">
  <link rel="alternate" type="application/feed+json"
        title="Example — Posts (JSON Feed)" href="/feed.json">
</head>

The browser, feed readers, and tools like the W3C Feed Validation Service pick these up automatically. The title

attribute is what the user sees in the subscribe UI — make it specific.

Why it matters #

Feed readers cannot subscribe to what they cannot find. Without<link rel="alternate">

, the user has to know the URL. With it, every modern reader auto-discovers from the homepage or any article.**Browsers and OS-level readers (Safari, NetNewsWire, Reeder) use the same discovery hook.**Search engines and aggregators treatrel="alternate"

as the canonical signal for syndication.Pair the same pattern withrel="alternate"

is a multi-purpose link relation.hreflang

for translated URLs (seehreflang), withtype="text/markdown"

forMarkdown source endpoints, and withmedia

for print or mobile alternates. Using it consistently teaches every tool that reads your site what to look for.

How to implement #

Pick the right MIME type. Browsers and readers branch on it.

Format MIME type
RSS 2.0 application/rss+xml
Atom 1.0 application/atom+xml
JSON Feed application/feed+json
Markdown source text/markdown

Include title for every alternate. A reader’s subscribe dialog shows the title verbatim. “RSS Feed” tells the user nothing; “Example — Engineering blog” does.

Put the most-preferred feed first. Some readers offer the first alternate by default if there are several.

Use absolute URLs in the feed itself, even if the href

here is relative — see machine-readable formats.

Site-wide vs page-specific. A blog index links to the main feed. An individual category page can additionally link to that category’s feed. An individual post does not need its own feed.

Don’t forget HTTP discovery. Some readers also honour Link

headers:

Link: </feed.xml>; rel="alternate"; type="application/rss+xml"; title="Example — Posts"

Useful for non-HTML responses (e.g. an API root) where there is no <head>

.

Common mistakes #

  • Using type="text/xml"

orapplication/xml

for an RSS feed. Some readers ignore it. - Linking to a feed that 404s, redirects, or fails validation. Run https://validator.w3.org/feed/

on every feed URL before shipping. - Pointing all <link rel="alternate">

entries at the same URL “to be safe”. Each entry must describe a distinct representation. - Omitting title

and letting the reader guess. - Putting rel="alternate"

on an<a>

link in the body. It only carries discovery semantics inside<head>

.

Verification #

curl -s https://example.com/ | grep -i 'rel="alternate"'

returns each declared alternate.- Paste the homepage URL into a feed reader’s “Add subscription” dialog — it should resolve to the correct feed without you typing the feed URL.

  • The W3C feed validatorreturns no errors on the linked feed. - View source on a per-language page and confirm rel="alternate" hreflang="…"

siblings sit alongside any feed alternates without conflicting.

Sources & further reading #

HTML Living Standard — Link types: alternate— WHATWG - MDN — rel=alternate— MDN - RSS 2.0 Specification— RSS Advisory Board - RFC 4287 — The Atom Syndication Format— IETF - JSON Feed 1.1— JSON Feed

── more in #developer-tools 4 stories · sorted by recency
── more on @rss 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/feed-discovery-with-…] indexed:0 read:3min 2026-06-18 ·