RSS Feeds for Dummies and Developers
Growing up with the internet I have never understood web syndication feeds (like RSS and Atom). I have seen the cute little orange icon with a caption to subscribe to a site’s updates. However, when I clicked on the RSS icon a cryptic looking text file would open.
Perhaps you are currently in the same boat as I once was, totally confused.
Table of Contents (click to expand)
What is RSS?
Let’s analyze…
Let’s begin with taking a look at the odd text you see when you open a RSS Feed link in browser and dissect it. Note: depending on the website the feed may open in browser or download as a plain text file.
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title>Caffeinated CPU</title>
<link>https://caffeinatedcpu.com/</link>
<description>A blog on computer stuff and coffee.</description>
<language>en</language>
<docs>https://www.rssboard.org/rss-specification</docs>
<item>
<title>Markdown Variants and History</title>
<description>Learn about Markdown history and current variants...</description>
<link>https://caffeinatedcpu.com/v1/blog/2024/March/markdown-variants-and-history/</link>
<guid>https://caffeinatedcpu.com/v1/blog/2024/March/markdown-variants-and-history/</guid>
<pubDate>10 Mar 2024 00:00 UTC</pubDate>
</item>
</channel>
</rss>
Unless you are familiar with the XML format, the text looks like some sort of code. That’s because it is not really meant to be human readable. Regardless, we can make out that the text contains a website’s metadata including:
- title: Caffeinated CPU
- link: https://caffeinatedcpu.com/
- description: A blog on computer stuff and coffee.
You may also notice there’s a bit of a hierarchy, under <channel>
there is an <item>
. Where in between <item>
and </item>
there’s metadata for a blog post.
- title: Markdown Variants and History
- link: https://caffeinatedcpu.com/v1/blog/2024/March/markdown-variants-and-history/
- description: Learn about Markdown history and current variants…
- publication date: 10 Mar 2024
Often times the full text content of a blog post or article is present in between <content:encoded>
and </content:encoded>
. Though it’s not present in in this case1.
In a nutshell, RSS Feed is a text format containing a website’s content. Cool? But, what is it used for?
Web content syndication
Chances are most your web consumption comes from a couple of big websites or apps like Reddit, Spotify, Facebook, YouTube, Instagram, etc. You may even go to a news network’s website to read… well news! Nowadays it’s less common to follow an individual’s blog on their personal website. Well, back in 1990s the world wide web was different from what it is today. It was mostly a loose collection static websites with some online forums in the mix. User generated content was in its infancy. More to the point, there was no centralized place to get content or updates from; it was before internet traffic was largely delegated to a handful of sites.
Yet the desire to read and get updates to online news and blogs in one place was there! There was a demand to collect various sources together in one package. How would such an app deliver such a feature? It could try to regularly scrape websites for content and changes, or it could refer to some computer friendly text format! RSS (Really Simple Syndication2) is one such web content syndication format, with it’s initial debut in 1999. Instead of inefficiently parsing the website’s various HTML pages, it grabs the site’s RSS Feed, a single formatted text file, that it uses to presents the websites contents to its readers in a user friendly way. That’s how web syndication software, i.e RSS readers, work.
Syndication: an act or instance of forming a syndicate (a group of newspapers under one management) or bringing something under the control of a syndicate.
The point of RSS is to provide a way to pragmatically collect website’s contents and updates.
Is RSS dead?
Let’s address the elephant in room… Is RSS dead? In 2013 the most popular RSS reader, Google Reader, was axed. Google claims it was due to a declining user base, but it is speculated that it was killed to make way for Google Plus (which is also now dead).
But, you know what Google didn’t kill (yet)? Blogger and FeedBurner! FeedBurner is a service to manage, track, and monetize RSS feeds. Although it has been gutted quite a bit; in 2021 email subscriptions (which was also used by Blogger) feature was removed. Furthermore, their Google Search Central Blog has an RSS Feed! Clearly within Google, it’s not dead… yet.
Most blogs and news websites, big and small, I have come across have a feed. In fact they are often generated by default by a content management software (CMS). Websites made with WordPress, the most popular CMS and website building platform, have them available by default on sites, typically under https://example.com/feed.
Reddit supports RSS feeds for the front page, subreddits, users and more.
If you are comfortable with the web browser’s developer tools, you can find RSS links hidden within the HTML. Just search for “RSS” to find something like this:
<link rel="alternate" type="application/rss+xml" title="RSS" href="https://www.youtube.com/feeds/videos.xml?channel_id=UCpVm7bg6pXKo1Pr6k5kxG9A">
As you can see, RSS feeds are everywhere, though not necessarily obvious.
There are popular service RSS Readers like Feedly, Newsburr and Inoreader. As well as stand alone (no sign up, no server required) apps like Feeder (not to be confused with Feeder.co, which does require an account). In fact, anyone can make an application to pull RSS feeds from websites, it’s an open system!
Next, a lot (if not all) podcasts are actually subscribed by podcast players using RSS under the hood! Even Google’s Podcast app let’s you subscribe via RSS. Too bad Google dumped Google Podcasts this year.
I would argue that the use of feeds for text content like blogs is niche, but not dead. If anything, there’s a bit of a resurgence as a counter to algorithmically fed content.
What is Atom?
Atom is another web syndication format, similar to RSS. It is newer (released in December 2005) and arguably better, but it’s not as popular. Its specification can be found here: https://www.rfc-editor.org/rfc/rfc4287.
All feed readers can parse both RSS and Atom feed formats without distinction to the end user. Nowadays Atom feeds are often labelled as RSS feeds anyway as RSS is basically the brand for web syndication.
RSS + Atom !?
There is ONE very useful feature from Atom, that’s so widely well received it’s officially unofficially part of RSS.
What do I mean by that? Well… let’s take a look at another example of a RSS feed, directly from the RSS Board (the authority on the RSS 2.0 format) themselves:
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:wordzilla="http://www.cadenhead.org/workbench/wordzilla/namespace">
<channel>
<title>RSS Advisory Board</title>
<link>https://www.rssboard.org/</link>
<description>RSS Advisory Board announcements and Really Simple Syndication news</description>
<language>en-us</language>
<docs>http://www.rssboard.org/rss-specification</docs>
<generator>Wordzilla/0.58</generator>
<ttl>10</ttl>
<atom:link rel="self" href="http://feeds.rssboard.org/rssboard" type="application/rss+xml"/>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/>
<item>
<title>How to Read an RSS Feed with Java Using XOM</title>
<link>https://www.rssboard.org/news/221/read-rss-feed-java-using-xom</link>
...
There’s a bit of Atom in the RSS feed! One of which is a self link; it is a piece of metadata of the feed for where it came from.
<atom:link rel="self" href="http://feeds.rssboard.org/rssboard" type="application/rss+xml"/>
Having Atom in RSS works because RSS supports adding tags from other XML format specification via namespaces. Although for this particular Atom tag, typically The namespace is not explicitly defined in the header as recommended. Like so: <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
.
EDIT: I incorrectly wrote how the RSS board’s RSS feed was missing a namespace declaration. RSS board’s RSS feed does follow the format they themselves reccomend. The RSS feed xml open in Firefox browser hides xmlns:
attributes, which mislead me and lead to the error. This section has been corrected.
What is JSON Feed?
This is the newest Web syndication format. It came out in 2017. The main difference is that it’s in JSON instead of XML. It works in the same way, a single formatted text for applications to parse.
{
"version": "https://jsonfeed.org/version/1.1",
"title": "Caffeinated CPU",
"home_page_url": "https://caffeinatedcpu.com/",
"feed_url": "https://caffeinatedcpu.com/v1/feed.json",
"description": "A blog on computer stuff and coffee.",
"language": "en",
"items": [
{
"title": "How to Make Your First Cup of Coffee Without a Brewer",
"content_text": "A recipe for making coffee without a brewer...",
"id": "https://caffeinatedcpu.com/v1/blog/2024/March/make-coffee-with-no-brewer/",
"url": "https://caffeinatedcpu.com/v1/blog/2024/March/make-coffee-with-no-brewer/",
"date_published": "2024-03-10T00:00:00Z"
},
...
Its adoption is modest. Furthermore, in the JSON Feed documentation, they actually recommend RSS over JSON Feed:
Any publisher already publishing RSS and/or Atom should continue to do so. In fact, if you’re trying to decide which format (of RSS, Atom, and JSON Feed) to use, and you can do only one, pick RSS — it’s time-tested, popular, and good.
How to add syndications feeds to your own website
Website builders and generators usually have the ability to add RSS/Atom feeds for you. Follow their documentation.
- WordPress:
- WordPress.org Feeds
- WordPress.org Customizing Feeds
- To add JSON feed, you need to use this plugin: https://github.com/manton/jsonfeed-wp
- If you hosting your WordPress site on wordpress.com, see the documentation here.
- Squarespace
- HUGO
If you are making it by hand (like I did for this website, the hard way) you should review the format and the required parts from the official specifications:
- RSS:
- https://www.rssboard.org/rss-specification.
- Atom:
- https://www.rfc-editor.org/rfc/rfc4287
- JSON Feed:
- https://www.jsonfeed.org/version/1.1
You will need to decide if you want to include all the site’s content or just a summary1 with a link to your site’s content.
How to subscribe to RSS/Atom/JSON feeds
First get yourself a feed reader application. I recommend Feeder for Android as it requires no account to use. Otherwise you can consider getting one of the top three: Feedly, Inoreader, and NewBlur. On the app find the option to add a feed, and enter a website’s URL (or paste in the RSS feed link directly) and click add. Voila you now have the website’s content or summary in your reader.
You can also subscribe to feeds from large user generated content websites like Mastodon, YouTube channels, Reddit, Stackoverflow, and more.
Normally your feed reader will be able to find hidden RSS feed links for you with a website’s link.
Great! Now after subscribing to various feed you now have your own personal self curated window for all your internet content. You may notice the UI looks very similar to an email inbox.
Email Newsletter
Email, a quintessential tool used by everyone and as old as the web itself (actually email is a bit older, but let’s not get into that now). It is one of the few computer technologies that withstood the test of time. You already have it! It’s one of the common ways to get updates. Just enter your email in the subscribe field of a website or create an account with your email and receive regular newsletters and notifications straight to your inbox.
Why not just use that?
Well, for starters you may want to segregate your email to be used for other purposes. One the modern issues with email, is getting too much! Furthermore, you may want to prevent the risk of getting your email address leaked and spammed with unsolicited messages.
There actually exist services to convert email newsletters to RSS feed, like Kill the Newsletter.
Next, supporting email subscription feature on a website is more expensive since the site’s owner needs to retrieve and store email addresses. They will also need to send the emails out. For small set of email addresses this may not be a problem. However, it’s more of a hassle when a website has thousands of subscribers. While RSS / Atom / JSON feeds are updated the same way as the the HTML content is.
This site
As of posting, this site now supports RSS and JSON Feeds:
However I understand it’s not for everyone. As such an email newsletter subscription is also available.
Making email subscription sign up work for my site (without using an out of the box solution like Beehive) took some effort. But, that’s a story for another time.
Further Reading
Wikipedia
The Wikipedia page on RSS does a fantastic job going over the history.
Wired article
- It’s Time for an RSS Revival by Brian Barrett
Other bloggers
- Why We Don’t Browse the Internet Anymore by Chris Titus
- On website subscriptions via RSS and Atom feeds by Fabrizio Musacchio
- Back to the Future with RSS by Nicky Case
YouTube videos
- STOP using SOCIAL MEDIA for News, RSS is MUCH BETTER! by The Linux Experiment
Credits
Written by Val Efimov, published on April 22, 2024.
Changelog
- Edited on April 24, 2024
- There was a factual error under RSS + Atom !? section. I incorrectly wrote how the RSS board’s RSS feed was missing a namespace declaration. RSS board’s RSS feed does follow the format they themselves reccomend. The RSS feed xml open in Firefox browser hides
xmlns:
attributes, which mislead me and lead to the error.
-
I have opted to only include links my blog articles in the RSS feed instead of including articles’ contents in full. This is done to keep the feed small and efficient to load. Furthermore, a smart enough feed reader will be able to grab the article by following the provided link and grabbing everything via HTML
<article>...</article>
on demand. I might change my mind on this later. ↩︎ ↩︎ -
Actually with RSS 0.90 it was initially called: “RDF Site Summary”. With RSS 0.91 is was called “Rich Site Summary”. ↩︎