Caution!

This is an old post. Information here may be out-dated, or the post may re­flect opin­ions or be­liefs I no longer share.

I come across many won­der­ful de­vel­op­ers run­ning their own blogs and host­ing an RSS or Atom feed. Adding them to my feed reader (plug for Miniflux) is a quick and easy way for me to fol­low their con­tent, as well as re­mind my­self to keep push­ing for­ward in my own ca­reer.

One such de­vel­oper clearly ad­ver­tised an RSS feed. However, I was quite sur­prised to find that Miniflux did­n’t pick it up on its own. The feed was hosted at the usual sus­pect lo­ca­tion: /feed.xml.

Upon fur­ther in­ves­ti­ga­tion, it turned out that the de­vel­oper had missed out on adding a meta tag that Miniflux, and prob­a­bly other feed reader, looks for.

If you have an RSS feed, en­sure that you also add a <link> tag with the ap­pro­pri­ate at­trib­utes in­side your <head> tag as fol­lows:

<link
type="application/atom+xml"
rel="alternate"
href="{url}"
title="{feed_title}"
/>

The type at­tribute can be ei­ther application/atom+xml or application/rss+xml, de­pend­ing on whether you have an Atom feed or an RSS 1.0/2.0 feed.

The rel at­tribute with a value of alternate, per MDN docs, can mean dif­fer­ent things de­pend­ing on its con­text. For an Atom or RSS feed, it says:

If the type is set to ap­pli­ca­tion/​rss+xml or ap­pli­ca­tion/​atom+xml, the link de­fines a syn­di­ca­tion feed. The first one de­fined on the page is the de­fault.

I like to give a com­plete and di­rect URL to my feed, but it is not im­por­tant. If you’d like to see how this is done on my site, go ahead and check the page source.