Skip to main content

Search 400 pages — tools, formats, elements, namespaces, directory, comparisons, XPath, datatypes, glossary, parse errors, schema errors, use cases, guides, blog and product.

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.

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 and site links with distinct relationships
<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.

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.