FAQ: RSS/Atom Autodiscovery

This document was created on 14 January 2015.

Is there still a reason to use RSS autodiscovery now that Google has taken a step away from RSS?


If your website produces RSS/Atom feeds, then as of 2015 you should still be setting up autodiscovery links for those feeds.

Note that all major browsers support RSS autodiscovery either natively (Firefox, IE, Safari) or through a plugin (Chrome). Feed readers, of course, support autodiscovery explicitly.

You can, but the spec recommends against it on the grounds that exposing the user to more than a single feed can be confusing.

A head MAY include more than one autodiscovery link, but each MUST identify a different feed.

To make the RSS subscription process simple for inexperienced users, publishers SHOULD include only one autodiscovery link per page, using it to identify a site’s main feed.

If you decide to include more than one autodiscovery link, the first link SHOULD be the site’s main feed.

Publishers who offer the same feed content in several syndication formats SHOULD NOT use autodiscovery links for all of them. Choosing only one feed format for autodiscovery makes it easier on new subscribers, especially if they are unfamiliar with syndication and can’t distinguish between the Atom, RSS 1.0 and RSS 2.0 formats.

So if you do declare multiple feed links, the primary site feed should come first, and you should avoid setting up autodiscovery for multiple feeds that differ only by content type (eg, RSS 1.0 vs 2.0 vs Atom).

<link href="/feed.xml" type="application/rss+xml" 
   rel="alternate" title="Coding the Wheel (Main Feed)">
<link href="/feed-comments.xml" type="application/rss+xml" 
   rel="alternate" title="Coding the Wheel (Comments Feed)">

Note that you can publish as many feeds in as many different formats as you like. These restrictions apply to the autodiscovery links only.

The two main ones are application/rss+xml and application/atom+xml although only the first of these is mentioned in the spec.

Note that the content type specified in the autodiscovery link might not match the content type of the feed resource itself. For example, StackOverflow uses application/atom+xml in the discovery link but serves the feed itself as text/plain.

Feeds in the wild are often served as text/xml, application/xml, or text/plain to sidestep issues with the handling of canonical feed types in browsers.

Can I use a relative URL for the feed resource?

You can, but it’s potentially unsafe. If you want to use a relative feed URL in your autodiscovery link, you should include a <base> specification on the page as well:

<base href="http://codingthewheel.com/">
<link href="feed.xml" type="application/rss+xml" 
   rel="alternate" title="Coding the Wheel (RSS)">

The problem, as always with <base> specifications, is that the user agent may ignore it entirely. So it’s safest to stick with absolute URLs:

<link href="/feed.xml" type="application/rss+xml" 
   rel="alternate" title="Coding the Wheel (RSS)">

How do I test RSS autodiscovery?

Configure web browsers and feed readers:

To test autodiscovery in web browsers, visit the various pages on your site and make sure the RSS icon (or other visual) is displayed, indicating the presence of a valid discovered feed.

To test autodiscovery in feed readers, subscribe to your website’s feed not through the canonical feed URL, but through a normal website URL such as http://codingthewheel.com. If the reader is able to infer your RSS feed URL from the provided website URL, autodiscovery is working.