Feed Autodiscovery Guide

November 9th, 2007 by Stephen Cronin (Please wait) [Shortlink]

Most modern browsers can automatically detect feeds offered by websites with feed autodiscovery enabled. This makes it easier to subscribe to these sites. If your blog doesn’t have feed autodiscovery enabled already, you need to set it up. Why make it harder for people to subscribe to your site?

Checking Whether It Is Enabled On Your Site

Checking whether you already have feed autodiscovery enabled is easy. Simply go to your site using a modern browser and check whether you can see the orange RSS icon in the Web Browser toolbar (not on the page itself).

Below is a screenshot of my site using Firefox. Note the orange feed icon. Internet Explorer 7 has the same icon, but in a different place.

Feed Autodiscovery Screenshot 1

If this icon is present on the toolbar when browsing your site, then you already have feed autodiscovery enabled.

It’s possible to have more than one feed enabled for autodiscovery. If your site has only one feed enabled, clicking the icon will take you to the feed. If there is more than one feed enabled, clicking the icon will show a menu, listing all feeds that have been found (see the following screenshot).

Feed Autodiscovery Screenshot 2

If your main site feed is already enabled, you may choose to enable other feeds, such as the Comments feed or even some of your category feeds. Just add the links you want, as outlined below.

Note: If you’re wondering why I’ve got both a Full Post Feed and a Summary Feed, that’s because I’m using the DualFeeds plugin. If you use DualFeeds, it can enable autodiscovery for you (see Feed Autodiscovery And The DualFeeds Plugin below).

How to Add Feed Autodiscovery Links

To enable a feed for autodiscovery, you need to add a link to it in the head section of your page’s HTML (between <head> and </head>). Ideally you should add this to all pages on your site.

An example of the link you need to add is as follows:

<link rel="alternate" type="application/rss+xml" title="Your Site Name RSS Feed" href="http://www.yoursite.com/feed" />

Obviously you need to replace "Your Site Name" with the name of your site and you need to replace http://www.yoursite.com/feed with your feed url.

If you wish to enable more than one feed, simply add a link for each one.

How you add these links to your pages will depend on which blogging platform you use. I outline how to do this in WordPress below.

What About FeedBurner?

If you use FeedBurner, you have the choice of using your site’s normal feed URLs or the related FeedBurner URLs.

If you use a FeedBurner redirection plugin, such as FeedBurner’s FeedSmith plugin or Flagrant Disregard’s Feedburner Plugin, I recommend using your site’s normal feed URLs, not the FeedBurner ones. The redirection plugin will redirect your normal URLs to the FeedBurner ones for you and if you ever stop using FeedBurner, there’ll be no need to change the autodiscovery links.

If you don’t use such a plugin, you need to use the FeedBurner URLs. If you ever stop using FeedBurner, you’ll have to change the autodiscovery links.

Setting Up The Links In WordPress

For WordPress users, the feed autodiscovery links should be added to the header.php file in your theme directory, as follows:

  1. Download header.php from the wp-content/themes/yourtheme folder, using an FTP program
  2. Make a copy of the file, in case you make a mistake
  3. Use a text editor to make the changes below
  4. When finished, save the file, then FTP it back up to the server, overwriting the original
It’s possible to do this via the Theme Editor in the Presentation menu of the WordPress Admin area, if you have the correct permissions. Personally, I do not recommend this, because you don’t have a copy of the file to restore if something goes wrong.

Changes to header.php (for step 3):

If autodiscovery is already enabled, find the following line (it may differ slightly depending on your theme) and add links to any extra feeds below it:

<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />

If you don’t have autodiscovery enabled, look for the </head> tag and add links to any extra feeds on the line immediately BEFORE this.

To add the links, use the format outlined above, eg:

<link rel="alternate" type="application/rss+xml" title="Your Site Name RSS Feed" href="http://www.yoursite.com/feed" />

Remember to change the details to reflect the title and URL for your site.

WARNING: If you change your permalink structure in future, you will need to update the autodiscovery links you add here, or the URLs will be wrong. If you just want your main site and/or comment feeds, use the following instead of the direct URL (this will always be correct regardless of any changes to your permalink structure). Note: You can’t do this if you want to use the FeedBurner URL (see What About FeedBurner? above).
Main Site Feed:

<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />

Comment Feed:

<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> Comments Feed" href="<?php bloginfo('comments_rss2_url'); ?>" />

Feed Autodiscovery And The DualFeeds Plugin

For users of my DualFeeds plugin (v1.1 & above) for WordPress, the good news is that you don’t need to set this up manually. DualFeeds can create the feed autodiscovery links for you. You simply turn on the appropriate parameters in the DualFeeds Options page in the WordPress Admin area.

Note: It’s likely that the main site feed (and maybe the comment feed) are already set up. You need to check if this is the case (as per Checking Whether It Is Enabled On Your Site above). Make sure you only turn on the DualFeeds parameters for those that doesn’t already exist, or you will get duplicates.

The Final Word

You want as many subscribers as possible, so make it easy for people to subscribe. Make sure that feed autodiscovery is turned on for your main site feed. Consider adding other feeds that readers may find useful. Make your feeds more accessible!

Like this article? Plus One it!

Tags: , , ,

There are 15 reponses to this article. Visit the comments page.

Leave a Reply

Anti-Spam Quiz:


Stephen Cronin

is Manager of Online Service Delivery at a Queensland Government department & has been a freelance WordPress developer/consultant since 2007
*Content on this site is my own and is not related to my employer

Hire me - I'm expensive, but I'm very good!

WordPress Plugins

Want a Custom WordPress plugin? See my Services page.

Greasemonkey Scripts

Visit my home page at Userscripts.org.