How to make an RSS feed with an easy subscribe link

Getting content spread around!

Making an RSS feed for my website seemed like a very simple concept but when I tried to find informaiton on it I ran into a lot of problems. It seemed like everything I tried didn’t work. Welcome to the world of web development!

For a while I used google reader and shared static web pages through it using their RSS feed engine and then used feedburner to feed it back into our website. This allowed others to subscribe to our news section and know when we had new press releases.

In October of 2011 sometime it seems Google stopped that service and now to share things you must be a Google +1 user. Perhaps G+ is cool but to force that on people is not what I am looking for. I want an easy time for people to view my content without forcing them to make an account. So I needed a back up plan.

Simply put if you want an easy way to have an RSS feed from your site the simplest way is just have a blog. RSS is already built into it. But if you have a static HTML website and don’t want the blog format then there are a few more steps involved. Here I will tell you the steps I used to get it working. It’s not automatic but it does give you more control in choosing what is shared and what isn’t.

A demo of what my goal was is to have a static HTML page that feeds into a news page.

Then if someone doesn’t want to keep checking this page for new news releases they can hit the subscribe button where they have a huge choice of ways to subscribe from email to any number of web based web browsers: http://feeds.feedburner.com/losmedanos/NVrV

[box] Step 1[/box]

You need to write an XML file that will be your RSS engine. I used feedvalidator to help me out on this because without that validation I couldn’t complete the other steps and my feed wouldn’t work. At first everything wasn’t right but on each point it gave me hints on how to fix it and finnally I got the green light for success!

Use a text editor or web editor of choice and put all these items in the following order beginning with your heading:

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">

Then you start your channel and for some reason unknown to me you have to put the href in for the address of the feed you are writing. I am not sure why but without it it doesn’t work. In this case the full URL ending with lmcnews.xml is the path for my XML feed that we are writing. Make sure you use your own address:

   <channel>
   <atom:link href="http://www.losmedanos.edu/news/lmcnews.xml"
    rel="self" type="application/rss+xml" />

Give your page a short title that means something because it will be picked up later:

           <title>lmcnews</title>

The link can be anything you want your title to link to. In this case I have it going back to where the list will show up

      <link>http://www.losmedanos.edu/news</link>

I filled in description but I am not using it. Later when you create your pretty feed with feedburner and with buzzboost you’ll have the option to turn these things on or off:

      <description>News from Los Medanos College</description>

Need to define the language otherwise the reader doesn’t know how to handle it:

      <language>en-us</language>

They seem to want to know who is responsible

      <managingEditor>(insert your email address here) (and author name)</managingEditor>

The date format was a bit of a bug for me but I just kept messing with it until I didn’t get errors anymore. This is the date that you would change every time you add a new entry so the reader knows what is new to grab.

      <lastBuildDate>17 Nov 2011 00:00:01 GMT</lastBuildDate>

This is another element that I am not using but it’s in here in case I later decide to separate out my feeds by a subject:

      <category>news</category>

Then comes your items where you can just add the newest item on the top of the last one enclosed in the <item> tag. I don’t have the description filled in but this is where you might have an excerpt of  your article for more information than just the title. The pubDate is of course when you want the article to show. I had to put some past articles up so I just gave them the date of the of the article and started the time at midnight.

The GUID tag must be in there for the reader to know the difference between each article. I’ve read there is no syntax for this but each one must be different. In my experience the feed reader read it versus the actual link tag so to be on the safe side I have made these both have the same address rather than giving it a number or a name that is unique.

      <item>
         <title>California Connects provides new group of  
         LMC's MESA students with laptops, software and Internet access 
         to train others in their communities</title>
         <link>http://www.losmedanos.edu/news/comp2011.asp</link>
         <description></description>
         <pubDate>17 Nov 2011 00:00:01 GMT</pubDate>
	<guid>http://www.losmedanos.edu/news/comp2011.asp</guid>
      </item>

Lastly close your XML with these two tags

</channel> </rss>

There are a number of free RSS creators out there if you a do a google search for RSS generator. I tried a few of them but found that I had to modify the output anyway to get it the feed to work write so hopefully the above is enough to get you started on doing it yourself.

[box] Step 2[/box]

The above text is for a simple feed that someone can subscribe to in the browser and it looks like this:
http://www.losmedanos.edu/news/lmcnews.xml

However if you want to gain broader exposure then sign up for a feed burner account.

Feedburner of course was acquired by google a little while back and like a lot of good things on the internet and they are changing how it works. At the time of writing this post they haven’t quite switched to their beta version. So until then you can just paste in the address of your XML file and then it will tell you if your feed is valid or not. If you have success then follow the rest of the instructions for adding functionality to your feed. You will be given a new address that people can use to subscribe to your feed.

But you aren’t done yet!

[box] Step 3[/box]

One last step is to click on the “Publicize” tab and the “buzzboost” where you can republish your feed as HTML right back into your site. Also on the that tab is a link for “Email Subscriptions” just in case people like to subscribe the old fashioned way with pain old email!

NOTE that if you republish your feed as HTML you can control how it looks by styling with CSS. So if for example you don’t like the bullets you can delete them. Google support documents this pretty well.

What you won’t find in their help page is how to get rid of their logo and you do that by putting this bit of code in your CSS:

#creditfooter {display: none;}

I’m sure there are other ways to do all of the above but so far this is the best way I have found for the situation I am of managing a website without an RSS engine already built in. Any other ideas I would love to hear!

2 thoughts on “How to make an RSS feed with an easy subscribe link

  • November 24, 2011 at 2:22 pm
    Permalink

    That is a very informative article, thanks! but I assume you did this in the past, as I subscribed to your blog’s rss feed some time ago 😉

  • November 24, 2011 at 7:08 pm
    Permalink

    Yeah but like I said making an RSS feed from a blog is incredibly simple but from a site that doesn’t have RSS built into it unlike this one it’s not as straight forward. You actually have to create it. Before I used a work around with google docs and a share button in the browser whenever I wanted an article to appear in a feed. This made it simple for my boss to post press releases to the college website. However that function doesn’t work anymore and she’ll have to either put the item in the XML file or just have me do it. Not quite as automated.

Leave a Reply

Your email address will not be published. Required fields are marked *