22 April 2009
1. Validate your feeds
It only takes a moment to validate a feed. Invalid feeds can cause all kinds of unexpected weirdness in feed readers and other applications. Find any errors and fix them.
2. Use autodiscovery
People that use feeds a lot love autodiscovery. It provides a consistent way of finding and subscribing to feeds from any website. Put an autodiscovery tag on your home page for every feed you’ve got and a tag on every interior page that’s got its own feed, eg. a tag for the news feed on the news page.
The standard tag format for RSS autodiscovery is:
<link rel="alternate" type="application/rss+xml" href="http://www.anytown.gov.uk/news.rss" title="Anytown Council News" />
and for Atom autodiscovery, use:
<link rel="alternate" type="application/atom+xml" href="http://www.anytown.gov.uk/news.atom" title="Anytown Council News" />
3. Use standard feed icons but only as direct subscription links
Whether you’re using RSS or Atom feeds, the standard feed icons are the common “beacon” style ones from Feed Icons. Get rid of the old orange rectangular “RSS” and “XML” text icons if you have them – they’re obsolete.
But don’t use the feed icons as illustrations. They should be clickable links directly to the feeds themselves so that people can subscribe. Avoid using them to link to RSS help pages or anything else.
Think: When I see this icon, I can click on it to subscribe.
4. Put your feed icons at the top of the related content
In-page feed subscription icons should be placed as near to the top of the related content as possible. Don’t bury the icon at the bottom of a list of news headlines, or even worse, in your page footer or a sidebar. Try to reinforce in your readers' minds that the feed is an alternative way of viewing the same content.
5. Check your feeds in an RSS reader
This will often show up odd things in your feed that a validator won’t catch – like all your item dates being the same, for example.
6. Don’t lose your subscribers when your feed moves
If your CMS will let you, publish your feeds at permanent URLs. If it won’t, you’ll lose all your subscribers when you move to a new CMS and the URLs change.
If this happens, use an HTTP 301 redirect to tell your readers' clients that the feed URL has changed permanently. Here’s how you do it.
Alternatively, proxy your feed through FeedBurner which will give it a permanent URL (and a few other toys to play with like usage stats, too).
7. Don’t offer the same feed in more than one format
People have got better things to do than to try to decide whether they want to read a feed in RSS 2.0, RSS 1.1 or Atom 1.0 format. Choose a single format for your whole site and stick with it. In practice, all formats work in all applications anyway. It gives you less to maintain and one less thing to worry about.
8. Shorten your item links if they’re longer than 255 characters
Some RSS reader applications use 255-character long fields to store item links. Some links are longer than that and will be truncated (and therefore, broken). If your CMS serves up item URLs longer than 255 characters try to run them through a URL shortening API like TinyURL first so they’ll always work.
9. Write a sensible feed title
The bit in your feed’s
Anytown Council News
Anytown Council - what’s on
Anytown Council Job Vacancies
Far, far too many feeds just have either the “Anytown Council” or the “news” bit, forcing users to rename those subscriptions in their readers if they’re going to make any sense at all.
Here are some bad examples from the Mash the State database:
Council Website Updates (but which council?)
Events (for who?)
Jobs Vacancies (sic)
Latest Online Consultations
www.anytown.gov.uk::Latest News (get rid of all that clutter)
10. Create an easy subscribe-by-email service
Many councils provide email alert services to keep their residents up to date. This is a lot of hassle, having to deal with bounces, unsubscribes and maintaining the whole mechanism. If you’ve got RSS feeds it only takes a moment to let people subscribe to them by email using third-party services like FeedMyInbox.
You can create a direct subscription link like this:
This is how we do the black subscribe-by-email links on Mash the State’s council pages. You get a whole email service for nothing without having to pay a penny or do any more work at all. Just like with RSS in general.
Got any more good tips? Leave a comment and I’ll work them into the article here.
Adrian Short works to get people the information they need, when they need it, in a way that they can understand.