Linking An RSS Or Atom Feed to a HTML Document

20th December 2007 - 1 minute read time

Adding a hyper link for an RSS or Atom feed on your web page works, but that's not all you can do. By adding a link to the head section of the page you can allow your users an alternative method of picking up your feed.

To add an RSS feed use this.

<link rel="alternate" type="application/rss+xml" href="" />

To add an Atom feed use this.

<link rel="alternate" type="application/atom+xml" href="" />

These are both XHTML examples. To do this in HTML just remove the slash on the right hand side like this.

<link rel="alternate" type="application/rss+xml" href="">
<link rel="alternate" type="application/atom+xml" href="">

You can add more than one link attribute to a page with no ill effects. If you provide multiple feeds most modern browsers will give you a list of feeds to select from.

Add new comment

The content of this field is kept private and will not be shown publicly.