RSS Feed Autodiscovery and the Link Tag Every Site Needs
Most people never type a feed URL. They paste a site's home page into their reader and the reader finds the feed. That works because of one line in the page head, and a surprising number of sites don't have it.
The tag
<link rel="alternate" type="application/rss+xml"
title="Site name" href="https://example.com/feed/">
rel="alternate" says this is another version of the page. type says what kind. href is where it lives. title is what the reader shows in its picker when a page offers more than one feed.
For Atom, the type is application/atom+xml. For JSON Feed it's application/feed+json. You can list several. A WordPress site offers two by default, the posts feed and the comments feed. Here's what pxef.com puts in its head:
<link rel="alternate" type="application/rss+xml" title="Pixel Effects » Feed" href="https://pxef.com/feed/" />
<link rel="alternate" type="application/rss+xml" title="Pixel Effects » Comments Feed" href="https://pxef.com/comments/feed/" />
The posts feed comes first. That order matters, since some readers just take the first one.
Who adds it for you
WordPress adds the tags itself when the theme declares support for automatic feed links, and almost every theme does.
Hugo generates index.xml for every list page out of the box, but the link tag lives in the theme. Most good themes include it. If you built your own templates, it's up to you. The usual Hugo snippet:
{{ with .OutputFormats.Get "rss" -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink }}" title="{{ site.Title }}">
{{ end -}}
Hand-rolled static sites and custom engines are where it most often goes missing. Somebody builds a nice RSS file and forgets to tell anyone it exists.
Checking a site
View source and search for alternate. Or from a terminal:
curl -s https://example.com/ | grep -io '<link[^>]*alternate[^>]*>'
If nothing comes back, readers will fall back to guessing common paths like /feed/, /rss.xml, /index.xml and /atom.xml. Many do guess, but you shouldn't count on it.
Put it on every page, not only the home page
People subscribe from wherever they are. If someone lands on a post from search and pastes that URL into a reader, the tag needs to be there too. Put it in the shared head template so every page carries it.
Category and tag pages can advertise their own feeds as well. Hugo already makes a feed for every taxonomy term, so a reader who only wants one topic can subscribe to that.
Make the href absolute
Relative URLs mostly work, since readers resolve them against the page. But absolute URLs remove a whole class of bugs, especially on sites served from a subfolder or behind a proxy that rewrites paths. It costs nothing.
A visible link helps too
Autodiscovery serves readers. Humans still benefit from a plain RSS link in the menu or footer. Syndicator does both: link tags for its Atom feed and its OPML bundle in the head, and RSS and OPML links visible on the page.
One line of HTML is the cheapest way to win back readers who would otherwise give up after the first paste.