Linking An RSS Or Atom Feed to a HTML Document

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="http://www.example.com/rssfeed.xml" />

To add an Atom feed use this.

<link rel="alternate" type="application/atom+xml" href="http://www.example.com/blog/wp-atom.php" />

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="http://www.example.com/rssfeed.xml">
<link rel="alternate" type="application/atom+xml" href="http://www.example.com/JustBlog/wp-atom.php">

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.

Comments

DebugBear, is saying that itemprop="" should be used.

Permalink

Add new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
1 + 9 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.