1. Technology

How to Add an RSS Feed to a Web Page

Connect Your RSS Feed to Your Web Pages

By

It's easy to add an RSS feed to your Web page or even add it to every page in your website. RSS enabled browsers will then see the link and allow readers to subscribe automatically. Also search engines and other robots will see the feed when it's linked in the HTML. Once you've created your RSS feed, you'll want to link to it so your readers can find it.

Link to Your RSS with a Standard Link

The easiest way to link to your RSS file is with a standard HTML link. I recommend pointing to the full URL of your feed, even if you normally use relative path links. But your link can be just a text link like:

<a href="http://webdesign.about.com/library/z_whats_new.rss">Subscribe to What's New</a>

Subscribe to What's New

If you want to get fancier, you can use a feed icon along with your link (or as the standalone link). You can get lots of feed icons from FeedIcons.com. You would link to your feed around the icon image, just like you would a standard image link:


<a href="http://webdesign.about.com/library/z_whats_new.rss"><img src="http://0.tqn.com/f/stay/a.gif" alt="Subscribe to What's New"></a>

You can put these links anywhere on your site that you want to suggest people subscribe to your feed.

Add Your Feed to the HTML

Many modern browsers have a way to detect RSS feeds and then give the readers an opportunity to subscribe to them. But they can only detect the feeds if you tell them they are there. You do this with the link tag in the head of your HTML:

<link href="http://webdesign.about.com/library/z_whats_new.rss" rel="alternate" type="application/rss+xml" title="What's New on About.com Web Design / HTML" />

Then, in various locations, the Web browser will see the feed, and provide a link to it in the browser chrome. For example, if you go to my previous articles page. In Firefox you'll see a link to the RSS in the URL box. You can then subscribe directly to the What's New feed without visiting any other page.

The most effective way to use this is to add the <link> into the head of all your HTML pages with an include.

  1. About.com
  2. Technology
  3. Web Design / HTML
  4. XML
  5. Specifications
  6. RSS
  7. How to Add an RSS Feed to a Web Page

©2014 About.com. All rights reserved.