{"slug": "from-rss-to-atom", "title": "From RSS to Atom", "summary": "In 2026, the author finally switched their personal website from RSS to Atom feeds, a change they acknowledge is 15-20 years overdue. The migration involved replacing the `key` attribute with UUID-based `id` elements in each post, updating feed templates, and modifying the Common Lisp program that generates the site. The author notes that Atom's explicit content type support is a key advantage over RSS 2.0, and currently the main feed only includes two entries published after the migration.", "body_md": "Yesterday, I switched my website from RSS feeds to Atom feeds. In case you are wondering whether you have somehow landed on an ancient post from 2010, no, you have not. Yes, this is the year 2026, and I have finally switched from RSS feeds to Atom feeds. Yes, I am fifteen, or perhaps twenty, years too late.\nI have always wanted to do this but could never make the time for it. Finally, it happened while I was giving my brain some rest from my ongoing algebraic graph theory studies. That's when I felt like spending a little time on my website and doing a little Lisp to change the feeds from RSS to Atom. I suppose this was impulse coding, a bit like impulse buying, except that I ended up with an Atom feed instead of a new book.\nI find it quite surprising that when I have plenty of time, it usually does not occur to me to do these things, but when I am too busy and really short of time, these little ideas possess me during the short breaks I take. My personal website is one of my passion projects. Common Lisp is one of my favourite programming languages. So any time spent on this passion project using my favourite programming language is a very relaxing experience for me. It serves as an ideal break between intense study sessions. It took about an hour to implement the changes needed to make the switch from RSS to Atom. In the end, I could go back to my studies reinvigorated.\nIn case you are curious, here is the Git commit where I implemented\nthe change from RSS to Atom:\n596e1dd.\nAs you might notice, a large portion of the change consists of\nreplacing the key\nattribute in each post with\nthe uuid\nattribute. The key\nattribute\nvalue was used as the value of the <guid>\nelement\nin the RSS feeds. While an arbitrary short string could serve as\nthe <guid>\nelement for the items in an RSS feed,\nthe <id>\nelement of the entries in an Atom feed\nneeds to be a URI. It turns out UUID URNs are a common choice for\nsuch a URI. I wrote the following shell command to replace all\noccurrences of the key\nattribute\nwith uuid\n:\nfind . -type f -name '*.html' -exec sh -c '\nfor f do\nsed \"s/^<!-- key: .* -->/<!-- uuid: $(uuidgen) -->/g\" \"$f\" > tmp &&\nmv tmp \"$f\"\ndone\n' sh {} +\nThe rest of the changes went into the feed templates and the Common Lisp program that statically generates the feeds along with the website.\nFor examples of the resulting feeds, see feed.xml and absurd.xml. The first is the main website feed and the second is an example of a tag-specific feed. Yes, the aforementioned Common Lisp program generates a feed for each tag. As of today, the main feed at feed.xml contains only two entries even though this website has over 200 pages. I explain the reason later in Temporary Workaround.\nHere is an example Atom entry from my feeds:\n<entry>\n<title>A4 Paper Stories</title>\n<link href=\"https://susam.net/a4-paper-stories.html\"/>\n<id>urn:uuid:06e5304d-c242-481c-bf94-e23b019b0a36</id>\n<updated>2026-01-06T00:00:00Z</updated>\n<content type=\"html\">\n<p>I sometimes resort to a rather common measuring ...\n</content>\n</entry>\nThe ellipsis (...\n) denotes content I have omitted for\nthe sake of brevity.\nI like how each entry in the feed now has its own UUIDv4. I also\nlike that timestamps in an Atom feed are in the\ndate-time\nformat specified in\nRFC 3339,\nwhich also happens to be a profile of ISO 8601. Further, I like\nthat I can explicitly declare the content type to be HTML. Commonly\nused values for the content type attribute are text\n,\nhtml\nand xhtml\n. If it is\nhtml\n, the content should be escaped HTML. If it is\nxhtml\n, the content should be an\nXHTML <div>\nelement containing valid XHTML.\nExplicit content type support is likely the biggest advantage of\nAtom over RSS. In comparison,\nRSS 2.0\ndoes not specify any way to declare the content type. So feed\nreaders have to inspect the content and guess what the content type\nmight be.\nAs I mentioned before, as of today, the main feed contains only two entries. That's because only new posts published since the migration to Atom are now included in the feed. This was done to avoid spamming subscribers. The Atom specification's requirement that each entry's ID must be a URI has caused the IDs of every entry to change. If I were to include the older posts from before the change in the feed, then those posts would appear as new unread items. Subscribers can find this quite annoying. In fact, I have received a few complaints about this in the past. So I was careful this time. I have a little one-liner workaround in my site generator to exclude posts published before this change from the feed.\nThat was the only workaround I had to implement. Fortunately, my\nfeed file had a neutral name like feed.xml\n, rather than\na format-specific name like rss.xml\n, so I could avoid a\nURL change and the subsequent overhead of setting up redirects.\nDoes any of this matter today? I think it does. Contrary to the recurring claim that RSS and Atom are dead, most of the traffic to my personal website still comes from web feeds, even in 2026. Every time I publish a new post, I can see a good number of visitors arriving from feed readers. From the referrer data in my web server logs (which is not completely reliable but still offers some insight), the three largest sources of traffic to my website are web feeds, newsletters and search engines, in that order.\nOn the topic of newsletters, I was surprised to discover just how many technology newsletters there are on the Web and how active their user bases are. Once in a while, a newsletter picks up one of my silly or quirky posts, which then brings a large number of visits from its followers.\nBack to the topic of web feeds, there is indeed a decent user base\naround RSS and Atom feeds. A good number of visitors to my website\narrive by clicking a feed entry that shows up in their feed\nreader. I know this with some confidence by looking at\nthe referer\n(sic) headers of visits to my HTML pages\nand the subsequent browsing of the website, as opposed to the\nisolated and automated fetches of the XML feeds. So there must be a\nreasonably active base of users around web feeds. It is a bit like\nbeing part of an invisible social network that we know exists and\nthat we can measure through indirect evidence.\nI found these three resources useful while switching to Atom feeds:", "url": "https://wpnews.pro/news/from-rss-to-atom", "canonical_source": "https://susam.net/from-rss-to-atom.html", "published_at": "2026-05-04 00:00:00+00:00", "updated_at": "2026-05-23 16:10:27.601037+00:00", "lang": "en", "topics": [], "entities": [], "alternates": {"html": "https://wpnews.pro/news/from-rss-to-atom", "markdown": "https://wpnews.pro/news/from-rss-to-atom.md", "text": "https://wpnews.pro/news/from-rss-to-atom.txt", "jsonld": "https://wpnews.pro/news/from-rss-to-atom.jsonld"}}