RSS Autodiscovery neon typography card

Feed autodiscovery is a small piece of HTML that removes a large amount of guesswork. A website places a link element in the document head, identifies the syndication format, and points to the feed URL. Compatible readers, browser extensions, crawlers, and developer tools can then find the feed without scraping page links or guessing common paths such as /rss.xml.

The markup is simple enough to copy in seconds, but correctness depends on details: the relationship, media type, URL, title, placement, and behavior when more than one feed exists. Autodiscovery should lead clients to the canonical feed, not to an obsolete alias, an HTML landing page, or a temporary environment.

For RSS 2.0, place a link like the following inside the HTML head of each relevant page:

<link rel="alternate"
      type="application/rss+xml"
      title="Example Site Updates"
      href="https://example.org/feed/">

The relationship is alternate because the feed is an alternate representation of the site’s changing content. The media type tells clients how to interpret the target. The title provides a human-readable label when a page exposes several choices. The href should resolve to the feed itself and ideally use the canonical HTTPS URL.

Publishers can compare their implementation with the RSS Advisory Board autodiscovery guidance. The key point is that discovery is declared by the HTML page; a client should not have to infer the feed from a decorative RSS icon or a sentence in the footer.

Atom and JSON Feed use distinct media types

An Atom feed uses application/atom+xml. JSON Feed 1.1 uses application/feed+json. A site may publish more than one format, but each link needs its own accurate media type and descriptive title.

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

Publishing multiple formats is useful only when they represent the same content reliably. If one version is abandoned or updated on a different schedule, discovery can send users into inconsistent histories. Remove unsupported formats rather than leaving stale link elements in every page.

Absolute URLs reduce ambiguity

Relative href values are valid in HTML and often work, but absolute feed URLs are easier to inspect and less vulnerable to mistakes involving base URLs, preview hosts, or copied templates. Static site generators should derive the absolute URL from the production site configuration and fail the build if it still contains localhost, a staging hostname, or an example domain.

Whichever form is used, the resolved target should be the canonical feed URL. Do not publish an old URL merely because it redirects. New subscribers should start at the preferred location; redirects exist to preserve existing subscriptions and aliases.

Put discovery in the head, not only in visible navigation

A visible “RSS” link is useful for people, and a machine-readable link element is useful for software. They solve different problems and should coexist. The autodiscovery element belongs in the document head, where clients expect metadata. A footer anchor with type="application/rss+xml" is not an equivalent substitute.

The link should appear in the initial HTML response. Injecting it later with JavaScript excludes clients that do not execute scripts and complicates crawling. On a fully static site, there is no reason to delay it.

Decide what a page is advertising

Many sites have one sitewide feed. In that case, every public page can advertise the same canonical URL. A blog article, about page, and homepage all point to the publication feed. This consistency helps tools discover the feed from any entry point.

Sites with category, author, language, or podcast feeds need a policy. A category page can advertise the category feed first and the sitewide feed second, using clear titles. An individual article usually advertises the sitewide or section feed rather than a one-item feed. A multilingual page should not silently link to a feed in a different language unless the title makes that relationship clear.

Order and titles matter when several feeds are present

Some clients display all discovered feeds; others choose the first compatible link. Put the most appropriate feed first. Titles should distinguish scope and format, such as “Engineering Updates — RSS” and “All Company News — Atom.” Avoid repeating the site name without indicating why two links differ.

Do not publish dozens of nearly identical category feeds on every page. Excessive discovery makes automated selection unreliable and produces a poor user experience. Advertise the feeds that are directly relevant to the page and link to a separate human-readable directory for the rest.

Keep HTML canonical metadata and feed identity aligned

The page’s canonical link identifies the preferred HTML page, while feed autodiscovery identifies an alternate syndication resource. They are not interchangeable. A blog homepage might contain both:

<link rel="canonical" href="https://example.org/blog/">
<link rel="alternate" type="application/rss+xml"
      title="Example Blog RSS" href="https://example.org/feed/">

The feed should also link back to the associated website through its channel metadata, and formats that support a self relation should point to the canonical feed URL. These reciprocal signals help resolvers connect the HTML publication, the feed document, and observed aliases.

Test the entire request, not only the tag

A perfectly written link element is useless if the target returns HTML, requires a cookie, redirects in a loop, or has malformed XML. Fetch the exact href from a clean client. Confirm the status, content type, character encoding, and final URL. Then subscribe with more than one reader and verify that the expected title and recent items appear.

Automated tests can parse representative HTML pages, collect feed link elements, resolve each href, and require a successful response. They should also reject production pages that reference development hosts. The feed validation guide covers checks for the target document itself.

Common autodiscovery failures

  • Wrong media type. The link says text/xml or text/html even though it targets an RSS feed.
  • Wrong relationship. A template uses rel="feed", which is not the established autodiscovery pattern.
  • HTML target. The href opens a subscription help page instead of returning feed data.
  • Staging hostname. Production pages advertise a preview or localhost URL.
  • Dead legacy path. The discovered URL was retired without a redirect.
  • JavaScript insertion. The link exists only after client-side rendering.
  • Undifferentiated choices. Several links have the same title, leaving users unable to select the intended scope.

Security and ownership considerations

Autodiscovery is a publisher assertion, not cryptographic proof. A compromised page can advertise an attacker-controlled feed. Clients that use discovery for sensitive workflows should fetch over HTTPS, apply normal certificate validation, and retain the page URL and discovery time as provenance. A registry should distinguish “declared by this page” from “verified as controlled by this organization.”

Publishers should monitor templates for unauthorized changes and ensure content management plugins cannot replace feed links unexpectedly. When a feed moves, update the discovery element at the same time the redirect is deployed. Leaving the old value in HTML prolongs dependence on the alias and obscures whether the new address is intentional.

A concise publishing checklist

  1. Place the link element inside the server-rendered HTML head.
  2. Use rel="alternate" and the format’s specific media type.
  3. Point directly to the canonical HTTPS feed URL.
  4. Add a useful title, especially when multiple feeds are advertised.
  5. Keep the same declaration across pages that share one sitewide feed.
  6. Test the resolved target and final response in real readers.
  7. Update the element during migrations while retaining redirects for old URLs.

Conclusion

RSS autodiscovery is a compact contract between a web page and feed-aware software. Correct markup removes guesswork, directs new subscribers to the canonical source, and gives registries an explicit relationship to record. Its simplicity is a reason to test it carefully, not a reason to ignore it.

A good implementation uses the right relationship and media type, lives in the HTML head, points to a working canonical URL, and clearly distinguishes multiple feeds. Paired with visible subscription links and durable redirects, it makes feed discovery reliable for both people and machines.