RSS Feed Best Practices (2022)
7 hours ago
- Use RSS 2 or Atom for your feed; Atom is recommended for new feeds due to less ambiguity.
- Set correct Content-Type headers: application/atom+xml, application/rss+xml, or application/feed+json.
- Use absolute URLs for all links and embedded content to ensure compatibility.
- Include feed discovery via <link rel='alternate'> tags in HTML pages.
- Serve feeds over HTTPS and reference media over HTTPS to protect privacy and avoid mixed content.
- Provide full content in the feed; for paid content, use auth tokens in the URL.
- Use stable, globally unique entry IDs (prefer permalinks) and never change or reuse them.
- Handle dates correctly: publication time never changes, avoid backdated or future timestamps.
- Set caching headers and support conditional requests (ETag/Last-Modified) to reduce server load.
- Enable CORS with Access-Control-Allow-Origin: * for browser-based feed readers.