hn.today

RSS Feed Best Practices (2022)

kevincox.ca68 points10 comments
Screenshot of RSS Feed Best Practices (2022)

Practical technical guidance for publishing blog feeds, arguing that compatibility, clarity, and correct metadata matter more than fancy features. Use a standardized format - Atom is preferred for new feeds because its spec is clearer, though RSS 2 is acceptable - and set correct Content-Type headers (application/atom+xml, application/rss+xml, or application/feed+json). Always use absolute HTTPS URLs for every link and embedded media, advertise a canonical feed on every page with rel="alternate" link tags (or Link headers if you must), and prefer serving full article content in entries unless monetization prevents it (in which case use per-user tokens or auth). Include a clear, concise feed title and prefer inline, simple CSS while avoiding JavaScript and fragile constructs.

Be rigorous about identifiers, dates, and caching: never change or reuse entry IDs (use permalinks or UUIDs), keep publication dates immutable and consistent with the order items appear, and only change update timestamps for significant edits. Provide an accurate self link to help redirects, caching, and WebSub, and set sensible cache-control to limit polling load based on publishing frequency. Those concrete rules prevent duplicates, lost items, broken discovery, and needless server strain across diverse readers.

Read on kevincox.ca10 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Web

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.