I come across many wonderful developers running their own blogs and hosting an RSS or Atom feed. Adding them to my feed reader (plug for Miniflux) is a quick and easy way for me to follow their content, as well as remind myself to keep pushing forward in my own career.
One such developer clearly advertised an RSS feed. However, I was quite surprised to find that Miniflux didn’t pick it up on its own. The feed was hosted at the usual suspect location: /feed.xml
.
Upon further investigation, it turned out that the developer had missed out on adding a meta tag that Miniflux, and probably other feed reader, looks for.
If you have an RSS feed, ensure that you also add a <link>
tag with the appropriate attributes inside your <head>
tag as follows:
<link
type="application/atom+xml"
rel="alternate"
href="{url}"
title="{feed_title}"
/>
The type
attribute can be either application/atom+xml
or application/rss+xml
, depending on whether you have an Atom feed or an RSS 1.0/2.0 feed.
The rel
attribute with a value of alternate
, per MDN docs, can mean different things depending on its context. For an Atom or RSS feed, it says:
If the type is set to application/rss+xml or application/atom+xml, the link defines a syndication feed. The first one defined on the page is the default.
I like to give a complete and direct URL to my feed, but it is not important. If you’d like to see how this is done on my site, go ahead and check the page source.