Create RSS Feed for Your Static Website

Can you implement RSS feeds for your static website? O yes, it is not only bloggers that can give their website visitors the opportunity to subscribe to their blog updates via RSS feeds. You too can create an RSS feed for your static website.

What are RSS Feeds?

rss icon

Really Simple Syndication (RSS) formats are relatively new terminology in the World Wide Web. It gained wide popularity around 2006 during the blogging boom. If you visit blogs, you will be familiar with the orange RSS feed icon that they usually ask you to subscribe to.

If you have an RSS feed on your website, your website visitors can benefit by subscribing to it. They will get information about new updates to your website right inside their favourite RSS reader including their browsers.

Though a lot of people have heard about RSS feeds, most people will not subscribe to it because they do not know how to use it neither do they know the benefits of subscribing to it. So depending on your target audience, you may need to educate your website visitors on how to make the most of your RSS feed if you do create one.

To make your RSS feed available to your website visitors, you should create the RSS file, upload it to your webhost and include a link to it in the <head></head> section of the webpages of your website.

For Internet Explorer, the RSS icon is at the top right hand side of the browser window. The icon is usually grey but turns orange whenever you visit a website that has RSS feeds.

For Firefox, when you visit a website that has RSS feeds, the lines and dot of the RSS icon changes from light grey to dark grey. This icon is not visible by default. If you want to enable it, you need to:

  1. Right-click on the space at the top right corner of your Firefox browser window. Select Customise.

    rss enable firefox

  2. Find the Subscribe icon (you may have to scroll down)

    rss subscribe drag

  3. Click and drag the icon to your browser toolbar and drop it there.

  4. You will see the RSS icon appear at the right hand side.

    firefox rss icon

Apart from your website visitors subscribing to the RSS feeds on your website, you too can benefit by having it on your website. By having RSS feeds on your website, you can display the titles of your website content when you comment on blogs with Comment Luv (ComLuv). More on that later.

Back to top

Subscribe to an RSS Feed of a Website

To subscribe to RSS feeds with Internet Explorer:

  1. While visiting a website you want to subscribe to, click on the orange RSS icon on your IE browser toolbar.

    ie rss icon

  2. Click Subscribe to this feed and the next window pops up. You can either create a new folder for the RSS feeds specific to that website or add it to the favorites bar.

    subscribe to feeds ie

  3. Click Subscribe and that's it! You will receive an update whenever the owner of the website adds new content to their website and updates the RSS file.

  4. Whenever you want to read feeds from the website you subscribed to, just click on the small down arrow beside the RSS feeds icon and select the appropriate folder or feed.

    read feeds ie

To subscribe to RSS feeds with Firefox:

  1. While on the website you want to subscribe to, click on the RSS icon you dragged out earlier and a new window will pop up.

  2. While IE only lets you subscribe to RSS feeds with only the browser, Firefox gives you more options. Here, in addition to subscribing with the browser, you can choose to subscribe to feeds with My Yahoo! Or Google.

    subscribe ff

  3. If you choose Google, you will be given an option of the Google Homepage or the Google Reader. It is up to you which one you choose but you must have a Google account before you can subscribe to feeds with Google.

  4. If you subscribe with My Yahoo!, you will be receiving the RSS feeds in your Yahoo page, not in your email inbox. And as with Google, you need to have a Yahoo! Account before you can subscribe with My Yahoo!

Subscribe to feed via the website itself

When on a website that offers RSS feeds, look for and click on the website's RSS feed icon. You will get a large number of readers to choose from.

Back to top

Create an RSS Feed for Your Static Website

If you have learnt how to create a sitemap.xml file for Google, then creating an RSS feed for your website will be so easy.

The RSS file is an XML file too so the file you will create for this will have the .xml extension. It is usually advisable to name the file as yourdomainname.xml so for this website, www.tpcreate.com, my RSS file is tpcreate.xml

All RSS files must conform to the XML 1.0 specification detailed by the W3C here.

If all that jargon confuses you, not to worry. You are not alone. I have no clue what they are talking about either. I searched and found this Harvard website that explains how to create RSS files in simpler terms.

RSS File Example

To explain an RSS feed file, let's take a look at this extract from the RSS file of my website.


<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
	<title>Create Your Own Website | The Ultimate Tutorial for Beginners</title>
	<description>Creating your own website can be very daunting. HTML tutorial for those who want to create a website but can't get started.</description>
	<link>http://www.tpcreate.com/</link>
	<item>
		<title>And they said I can create a Website in 5 Steps ... Fail!</title>
		<description>Get the facts about creating your own website.</description>
		<link>http://www.tpcreate.com/before-you-create-website/create-your-own-website-facts/</link>
	</item>
	<item>
		<title>If Your Website is a Book, Will be on the NYT Bestsellers List?</title>
		<description>Research your niche and choose a website topic.</description>
		<link>http://www.tpcreate.com/before-you-create-website/brainstorm-website-idea-and-choose-website-topic/</link>
	</item>
	<item>
		<title>20 Steps to Complete Website Creation Domination</title>
		<description>Follow these steps and you will be in complete control of creating your own website.</description>
		<link>http://www.tpcreate.com/</link>
	</item>
</channel>
</rss>



RSS File Explained

An RSS file must start with the code:

<?xml version="1.0" encoding="UTF-8"?>

This tells you the type of file it is (XML), the version of XML and the character encoding; in this case UTF-8.

This is then followed by the opening RSS tag. The current RSS version is also included here. Remember to close off the RSS tag with </rss> at the end of the RSS file. Though the date on the Harvard website says 2003 but the information on there is up-to-date.

Within the RSS tag, you have the channel element which describes the RSS feed. The channel element must contain these required elements:

<title> This is usually the title of the home page of your website.

<description> This should be the description of the homepage of your website.

<link> This is the url of the homepage of your website or your domain name.

There are other optional sub elements which you can include in the channel element to give more information about your RSS feed file. These include:

<language> This specifies the language the document is in and to indicate that the document is in English, the markup is:

<language>en</language>

<copyright> This indicates the owner of the copyright of the content and the mark-up is:

<copyright>Copyright 2011 by Flo Madubike</copyright>

<pubDate> This defines the last publication date for the content of the feed and the markup for this is:

<pubDate>01 Jun 2011 03:52:21 GMT</pubDate>

<docs> This is a URL that refers to the documentation for the format you used in preparing the RSS file and in my case, I used the documentation in the Harvard website and the mark-up for that is:

<docs>http://cyber.law.harvard.edu/rss/rss.html</docs>

There are many other optional sub channel elements that you can add to your feed, these are all detailed on the Harvard website.

The channel element also usually contains one or more <item> elements. These item elements are used to list the articles in the RSS feed. The item element also has these required elements:

<title> In the case of the channel element, the title here refers to the title of the article on your website This is also what those who subscribed to your RSS feed will see as the subject of the feed when they receive it in their favorite feed reader. So you need to make this title interesting.

Take a look at the example above to see what I mean.

This title also appears with your comments when you comment on blogs with CommentLuv. Take a look below at the comment I left on a blog with CommentLuv and see how the title of one of my articles (with the red arrow) is displayed.

title of article on comment luv blog

<description> As with the channel element, this should also be a brief description of the article that the title refers to.

<link> This is the url of the article you are talking about in the description. Your RSS feed subscribers will follow this link to your website to read the story or article in full.

Each item element should be closed with a corresponding </item> tag.

Then finally the channel is closed off with </channel>.

Other Important Stuff

You should replace all the ascii characters that appear in your RSS file with their entity numbers or names. Examples:

Replace With
& &amp;
" &#34;
' &#39;

These are only a few examples. More ascii characters and their corresponding entity numbers can be found at http://www.w3schools.com/TAGS/ref_entities.asp.

When < and > are not part of RSS file tags, they should also be replaced with &lt; and &gt; respectively.

You can take a look at the full version of the RSS file of my website by going to http://www.tpcreate.com/tpcreate.xml. Once you are there, see the markup (xml codes) by clicking View on the browser menu then select Page Source for Firefox. For Internet Explorer, click View on the browser menu and select Source.

Then you will be looking at the RSS file for this website.

So to Create Your Own RSS File:

  1. Open Notepad++ and replicate the above example. You can add as many <item> elements as you want. Remember to replace all the data for my website with your own website information.

  2. Save the file as yourdomainname.xml

  3. Validate your feed at http://validator.w3.org/feed/ to make sure that it conforms to the RSS specifications. Correct any errors flagged by the validator.

  4. Upload the file to the public_html folder on your webhost.

  5. Submit your RSS feed to Google the same way you submit a sitemap.xml.

  6. Include the following tag in the <head></head> section of all the pages of your website so that your readers can subscribe from any page of your website with their browsers.

    <link rel="alternate" type="application/rss+xml" title="www.yourdomainname.com RSS Feed" href="http://www. yourdomainname.com/yourdomainname.xml" />

    As usual, replacing yourdomainname with your actual domain name.

  7. Find a strategic location on your web pages and place the RSS icon with something like "Subscribe to my RSS feed" The HTML code will look like this:

    <p>
    Subscribe to my RSS feed 
    <a href="http://www.yourdomainname.com/yourdomainname.xml">
    <img src="http://www. yourdomainname.com/images/rss-icon.png" alt="rss icon" width="20px" height="20px" />
    </a>
    </p>
    

    The size of the image is only an example, you can choose any reasonable size for your RSS icon.

Then when your website visitors click on the RSS icon, they will be transferred to the page where they can subscribe using their favorite reader:

Whenever you add a new article, content or webpage to your website, you should add an <item> element to your RSS file with the Title, Description and Link to the new article. Save and upload to your webhost and all your subscribers will receive the update in their chosen RSS reader.

Ta-da!

That's your RSS feed for static websites done.

Back to top

Popular Website Reference

Create it | Special Pages

Flo's Recommendations