Feeds guide
Atom rel=self vs rel=alternate
Publish Atom links with explicit relationships so clients can distinguish the feed document from its human-facing site and entry pages.
7 min read · Updated 2026-08-21
The short answer
Use rel="self" for the preferred URL that retrieves the Atom feed document itself, and rel="alternate" for another representation such as the human-facing HTML page. If rel is omitted, Atom treats the link as alternate, so a feed URL must declare self explicitly.Name the resource each link represents
A feed commonly needs both a machine-facing retrieval URL and a browser-facing site URL. The relationship value, not the file extension or media type alone, tells a consumer which is which.
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Example updates</title>
<id>https://example.com/</id>
<updated>2026-08-21T12:00:00Z</updated>
<link rel="self" type="application/atom+xml" href="https://example.com/feed.atom"/>
<link rel="alternate" type="text/html" href="https://example.com/"/>
</feed>Declare self explicitly and keep it fetchable
Atom says a feed should contain one self link identifying the preferred URI for retrieving that feed document. A relative href can be resolved against a base URI, but an absolute public URL is easier to test across mirrors, proxies, and copied files.
- Point self at the canonical feed response, not the site homepage.
- Use application/atom+xml as the type when that is the returned representation.
- Update self deliberately when a feed moves to a new canonical URL.
- Do not assume an omitted rel means self; it means alternate.
Keep entry links scoped to each entry
An entry's alternate link normally opens that entry's human-readable page. A feed-level alternate link describes the feed as a whole. Place links under the resource they describe and avoid copying the feed's self URL into every entry.
Validate the final public response after redirects so the self href, canonical location, and media type describe the same resource clients actually receive.
Prove the fix
- Validate the Atom feedCheck the relationship values in the complete public document.
- Review Atom linkConfirm href, rel, type, language, and placement constraints.
- Check required elementsVerify feed and entry identity, timestamps, authors, and links together.
Related guides
- Atom feed required elements checklistBuild the smallest conforming Atom feed, satisfy feed and entry requirements, and handle author and content rules without RSS assumptions.
- RSS guid vs link: which one identifies an item?Keep RSS item identity stable, use isPermaLink correctly, and avoid duplicate entries when article URLs or titles change.
- RSS HTML: CDATA or escaped text?Publish HTML-shaped RSS descriptions without producing child markup, double-escaping entities, or breaking on an unexpected CDATA terminator.
Get started
Bring order to the XML your team can't afford to ignore.
Create a free account and get a private workspace to search, validate, diff, and monitor your XML feeds, sitemaps, schemas, and vendor integrations.