Pete Freitag Pete Freitag

How to add RSS Autodiscovery to your site

Updated on February 10, 2022
By Pete Freitag
web

I sometimes see web sites or blogs that have RSS feeds, but fail to include the one line of HTML that enables RSS autodiscovery. Even some well known blogs such as 37 Signals - Signal Vs Noise omit the feature. Jason Kottke's blog has autodiscovery support on the main page, but not on his entry pages.

Adding that one line of code to your template will make it easier for people to subscribe to your RSS feed. Here's how:

<link rel="alternate" type="application/rss+xml" 
  title="RSS Feed for petefreitag.com" 
  href="/rss/" />

The above link tag should be added inside the head tag of your HTML document.

You will of course need to change the value of the title and href attributes to fit your needs.

If your feed is an ATOM feed you will want to change the type to application/atom+xml.

If you have multiple feeds for the url you can just specify multiple link tags.

When you enable autodiscovery for your rss feed it allows browsers and aggregators to automatically detect the RSS feed when your browsing, and it makes it easy for the user to subscribe to it. Both FireFox, and Safari 2.0 support autodiscovery of RSS feeds out of the box, here's what it looks like when you find one:

firefox autodiscovery button safari autodiscovery button


rss autodiscovery html atom blogs

How to add RSS Autodiscovery to your site was first published on June 15, 2005.

If you like reading about rss, autodiscovery, html, atom, or blogs then you might also like:

Discuss / Follow me on Twitter ↯

Comments

That's awesome I wondered why mine wasn't working, thanks Pete!
by freaksauce on 06/15/2005 at 7:30:12 PM UTC
The trailing slash is illegal according to the w3 validator.
by Michael Dinowitz on 06/15/2005 at 10:12:58 PM UTC
Michael - The trailing slash on the link tag is required if your document type is XHTML, if your doctype is HTML 4.0 then you should not have the closing slash on the tag.
by Pete Freitag on 06/16/2005 at 10:27:21 AM UTC
I do not see the RSS icon on Firefox, when I go here, for example:

http://www.washingtonpost.com/wp-adv/rss/front.htm

i.e., I don't see any autodiscovery for it.

On your website, and on the WSJ feed website, I do see the auto-discovery icon on Firefox. I know how to subscribe when the icon is there but how does one subscribe when the icon is not present.
by M. Mortazavi on 10/07/2005 at 9:18:48 PM UTC
yeah, I use the same trick too :)
by naser on 11/19/2005 at 11:03:21 AM UTC
Great! Remarkable, I've implemented it and it works.
by suray on 06/24/2007 at 7:34:28 PM UTC
Is it working for Windows Live Spaces !
by LeoTheMaster on 06/25/2007 at 3:02:42 AM UTC
Thank you for the useful advice!
by David Hepworth on 04/10/2008 at 9:16:23 PM UTC