Check 48.06 · Media and publishers

Publish a complete RSS or Atom feed

Publish a valid RSS or Atom feed: autodiscovery, accurate dates, stable guids, HTTP caching and WebSub, on WordPress, Shopify, Drupal, Laravel or Next.js.

Priority
Important
Difficulty
Intermediate
Estimated time
1 to 3 h
Free, no account: your progress is saved in this browser.

Ask an AI to check this point on your site

Opens the assistant with a ready-made question: this check, its goal and your site URL.

For Gemini, Copilot or another assistant, copy the question. The link opens the chosen service directly: nothing goes through this site.

In short

An RSS or Atom feed is an XML file that lists your latest articles with their title, URL, date and author. Feed readers, aggregators, newsletter tools and search engines re-read it to find out what has just been published. Once this check is done, the site exposes a valid feed, announced in the <head> of every page, with accurate dates and stable identifiers, which clients can revalidate without downloading it again.

Why it matters

In 2026, the feed is still the only open format that software can query to learn what is new on your site without crawling it. Its actual readers:

  • Feed readers and aggregators (Feedly, Inoreader, NetNewsWire, topical aggregators): a small but regular audience that has chosen you.
  • Tools that consume a feed: automated newsletter sending (“RSS-to-email” campaigns), posting to social networks, automations, intranets, partner applications.
  • Search engines: Google accepts RSS 2.0 and Atom 1.0 feeds as sitemaps and points out that a feed only describes recent URLs. Its recommendation, an old one that is still online, is to combine an XML sitemap for the whole site with a feed for new content.
  • WebSub hubs: Google's sitemap documentation states that a site that publishes a feed can use WebSub, a W3C protocol, to broadcast its updates to search engines, Google included, instead of waiting for them to come by.

Two uses should be left out of your expectations. Chrome's “Follow” feature, which relied on feeds, is no longer documented: Google removed that guidance from its Discover documentation in November 2025, stating that the feature is no longer displayed there. For Google News, the feed does not replace the Google News sitemap (opens in a new tab). As for AI assistants, we found no official documentation describing any use of feeds: an agent can read a feed like any public URL, nothing more.

A poorly maintained feed has visible effects: wrong dates that push old articles back to the top, unstable guid values that republish the whole feed to every subscriber, invalid XML that readers silently reject.

What it improves

  • Discovery New URLs are reported to search engines as soon as they are published, especially with WebSub. The effect is on crawl speed, not on rankings.
  • Direct audience Regular readers who depend on neither an algorithm nor a social network.
  • Distribution Automated newsletters, pickup by aggregators, integrations with partners, with no custom development.
  • Server load With ETag and Last-Modified, most re-reads end in a 304 response with no body.
  • Citations in AI answers Undocumented effect. Expect nothing measurable.

How to check

Look for the feed announced by the home page, then read its headers:

curl -s https://example.com/ | grep -i -o -E '<link[^>]*rel="alternate"[^>]*(rss|atom)[^>]*>'
curl -sI https://example.com/feed.xml | grep -i -E "^(HTTP|content-type|etag|last-modified|cache-control)"

Compliant result:

<link rel="alternate" type="application/rss+xml" title="Example: latest articles" href="https://example.com/feed.xml">
HTTP/2 200
content-type: application/rss+xml; charset=utf-8
etag: "6f2a9c1b"
last-modified: Fri, 27 Nov 2026 07:30:00 GMT
cache-control: public, max-age=600

Replay the request with the value you received: the response must be 304.

curl -s -o /dev/null -w "%{http_code}\n" -H 'If-None-Match: "6f2a9c1b"' https://example.com/feed.xml

Then:

  1. Run the feed URL through the W3C Feed Validation Service: no error message, and as few warnings as possible.
  2. Open the feed and check three things: the links are absolute and canonical, each date matches the one displayed on the article, and the most recently published article comes first.
  3. Subscribe in a feed reader, then change a comma in an article: it must not reappear as new.

How to implement

Before you start

RSS or Atom? Both are read everywhere. RSS 2.0 is the most widespread; Atom 1.0 (RFC 4287) is stricter, with a mandatory identifier and update date for each entry. Keep the one your tool produces: a single correct feed is better than two approximate ones.

Excerpt or full content?

Choice Advantages Limits
Full content Comfortable reading in feed readers, complete automated newsletters, loyal subscribers Fewer visits to the site, easy wholesale copying by sites that republish feeds
Excerpt Every read goes through the site, content less exposed Frustrated subscribers, thin newsletters

An ad-funded site leans toward a well-crafted excerpt; a site whose goal is loyalty or influence, toward full content. For paywalled articles, publish only the title and the lead-in: a full-text feed bypasses the wall (see mark up paywalled content (opens in a new tab)).

Reference feed (RSS 2.0):

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
     xmlns:atom="http://www.w3.org/2005/Atom"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Example: latest articles</title>
    <link>https://example.com/</link>
    <description>The latest articles published on Example.</description>
    <language>en-US</language>
    <lastBuildDate>Fri, 27 Nov 2026 07:30:00 +0100</lastBuildDate>
    <atom:link href="https://example.com/feed.xml" rel="self" type="application/rss+xml"/>
    <atom:link href="https://pubsubhubbub.appspot.com/" rel="hub"/>
    <item>
      <title>2027 budget: what changes for local councils</title>
      <link>https://example.com/politique/budget-2027-communes/</link>
      <guid isPermaLink="true">https://example.com/politique/budget-2027-communes/</guid>
      <pubDate>Fri, 27 Nov 2026 07:30:00 +0100</pubDate>
      <dc:creator>Claire Martin</dc:creator>
      <category>Politics</category>
      <description>Grants, local taxation, timetable: the measures that affect town halls.</description>
      <content:encoded><![CDATA[<p>Full text of the article, in HTML.</p>]]></content:encoded>
    </item>
  </channel>
</rss>

Rules to follow, whatever the environment:

  • Dates: RFC 822 format with a four-digit year and a time zone in RSS (Fri, 27 Nov 2026 07:30:00 +0100), RFC 3339 in Atom (2026-11-27T07:30:00+01:00). pubDate is the date of first publication and never moves again; see display actual dates (opens in a new tab).
  • Stable guid: the canonical URL if it never changes, otherwise an internal identifier with isPermaLink="false". A guid that changes creates a duplicate for every subscriber.
  • Absolute, canonical URLs, in link as well as in the HTML of content:encoded (images included).
  • Title and author identical to those on the page.
  • Twenty to fifty entries, most recent first: the feed is not an archive.
  • Autodiscovery: in the <head> of every page,
<link rel="alternate" type="application/rss+xml" title="Example: latest articles" href="https://example.com/feed.xml">
  • HTTP caching: ETag or Last-Modified, a 304 response to conditional requests and roughly Cache-Control: public, max-age=600. The principles are those of the guide on browser and server caching (opens in a new tab).
  • WebSub (optional): declare a hub in the feed (rel="hub"), then notify it on each publication by following its documentation.

Finally, declare the feed as an additional sitemap in Search Console (Sitemaps report), alongside the XML sitemap: see submit sitemaps to Google and Bing (opens in a new tab).

WordPress

Versions WordPress 6.4 to 7.1.

Built in. The main feed is at /feed/ (RSS 2.0) and /feed/atom/; each category, tag and author has its own (/category/politique/feed/). Themes that declare add_theme_support( 'automatic-feed-links' ), which is nearly all of them, add the autodiscovery tags. WordPress also handles conditional requests on its feeds.

In Settings > Reading, set the number of items (“Syndication feeds show the most recent”) and choose between “Full text” and “Excerpt”. For WebSub, the WebSub plugin notifies hubs on each publication. Check that your caching plugin is not serving a stale feed for hours: ten minutes of caching is enough.

Shopify

Versions Shopify, all plans, Online Store 2.0 themes, November 2026.

Built in for blogs: each blog exposes an Atom feed at the blog's URL followed by .atom (https://example.com/blogs/actualites.atom). This feed cannot be configured from the admin. If your theme does not announce the feed, add this to layout/theme.liquid, before </head>:

{%- if blog -%}
  <link rel="alternate" type="application/atom+xml" title="{{ blog.title | escape }}" href="{{ shop.url }}{{ blog.url }}.atom">
{%- endif -%}

Drupal

Versions Drupal 10 and 11.

The standard profile provides a front page feed at /rss.xml, produced by the “Frontpage” view. For a feed per section or per content type, open Structure > Views, add a “Feed” display to the view concerned, give it a path (/actualites/feed) and attach it to the page display: Drupal then adds the autodiscovery tag. The number of items per feed is set in Configuration > Web services > RSS publishing (/admin/config/services/rss-publishing); the content of the items depends on the content type's “RSS” view mode.

Webflow

Versions Webflow Designer, site plans with CMS, November 2026.

In the Pages panel, open the settings of the collection's template page, go to the “RSS Feed Settings” section, turn on “Enable RSS 2.0 feed”, map the fields (title, description, image), then publish. The feed URL is displayed in those same settings: copy it rather than guessing it, and place the autodiscovery tag in Site settings > Custom code > Head code.

Laravel

Versions Laravel 11 to 13, spatie/laravel-feed 4.5.

composer require spatie/laravel-feed
php artisan vendor:publish --provider="Spatie\Feed\FeedServiceProvider" --tag="feed-config"

Add Route::feeds(); to routes/web.php, then describe the feed in config/feed.php:

return [
    'feeds' => [
        'main' => [
            'items' => [App\Models\Article::class, 'getFeedItems'],
            'url' => '/feed.xml',
            'title' => 'Example: latest articles',
            'description' => 'The latest articles published on Example.',
            'language' => 'en-US',
            'format' => 'rss',
            'view' => 'feed::rss',
            'type' => 'application/rss+xml',
        ],
    ],
];

The model implements Feedable:

use Illuminate\Database\Eloquent\Collection;
use Spatie\Feed\Feedable;
use Spatie\Feed\FeedItem;

class Article extends Model implements Feedable
{
    public function toFeedItem(): FeedItem
    {
        return FeedItem::create()
            ->id(route('articles.show', $this))
            ->title($this->title)
            ->summary($this->excerpt)
            ->updated($this->published_at)
            ->link(route('articles.show', $this))
            ->authorName($this->author->name);
    }

    /** @return Collection<int, Article> */
    public static function getFeedItems(): Collection
    {
        return static::query()->whereNotNull('published_at')->latest('published_at')->limit(30)->get();
    }
}

In the <head> of the layout, @include('feed::links') writes the autodiscovery tags. For caching, use the cache.headers middleware that ships with Laravel:

Route::middleware('cache.headers:public;max_age=600;etag')->group(function (): void {
    Route::feeds();
});

Symfony

Versions Symfony 6.4, 7.4 and 8.x.

#[Route('/feed.xml', name: 'feed')]
public function feed(Request $request, ArticleRepository $articles): Response
{
    $items = $articles->findLatestPublished(30);

    $response = new Response();
    $response->headers->set('Content-Type', 'application/rss+xml; charset=utf-8');
    $response->setPublic();
    $response->setMaxAge(600);
    $response->setLastModified($items[0]->getPublishedAt());

    if ($response->isNotModified($request)) {
        return $response;
    }

    return $this->render('feed.xml.twig', ['items' => $items], $response);
}

In templates/feed.xml.twig, reuse the reference feed and loop over the articles; the date('r') filter produces the date format RSS expects:

{% for item in items %}
<item>
  <title>{{ item.title }}</title>
  <link>{{ url('article_show', {slug: item.slug}) }}</link>
  <guid isPermaLink="true">{{ url('article_show', {slug: item.slug}) }}</guid>
  <pubDate>{{ item.publishedAt|date('r') }}</pubDate>
  <description>{{ item.excerpt }}</description>
</item>
{% endfor %}

Next.js

Versions Next.js 15 and 16 (App Router).

app/feed.xml/route.ts:

export const revalidate = 600;

const escapeXml = (value: string) =>
  value.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');

export async function GET() {
  const posts = await getLatestPosts(30);

  const items = posts
    .map((post) => {
      const url = `https://example.com/articles/${post.slug}/`;

      return `<item>
  <title>${escapeXml(post.title)}</title>
  <link>${url}</link>
  <guid isPermaLink="true">${url}</guid>
  <pubDate>${new Date(post.publishedAt).toUTCString()}</pubDate>
  <description>${escapeXml(post.excerpt)}</description>
</item>`;
    })
    .join('\n');

  const xml = `<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
  <title>Example: latest articles</title>
  <link>https://example.com/</link>
  <description>The latest articles published on Example.</description>
  <language>en-US</language>
  <atom:link href="https://example.com/feed.xml" rel="self" type="application/rss+xml"/>
${items}
</channel>
</rss>`;

  return new Response(xml, {
    headers: { 'Content-Type': 'application/rss+xml; charset=utf-8' },
  });
}

Autodiscovery, in app/layout.tsx:

export const metadata = {
  alternates: {
    types: { 'application/rss+xml': 'https://example.com/feed.xml' },
  },
};

Nuxt

Versions Nuxt 3 and 4.

Create server/routes/feed.xml.ts: the XML is built the same way as in the Next.js section.

export default defineEventHandler(async (event) => {
  setHeader(event, 'Content-Type', 'application/rss+xml; charset=utf-8');
  setHeader(event, 'Cache-Control', 'public, max-age=600');

  return buildFeedXml(await getLatestPosts(30));
});

In app.vue, announce the feed:

useHead({
  link: [{ rel: 'alternate', type: 'application/rss+xml', title: 'Example: latest articles', href: 'https://example.com/feed.xml' }],
});

Astro

Versions Astro 5 to 7, @astrojs/rss 4.

Install the official package (npm install @astrojs/rss), set site in astro.config.mjs, then create src/pages/rss.xml.js:

import rss from '@astrojs/rss';
import { getCollection } from 'astro:content';

export async function GET(context) {
  const posts = await getCollection('blog');

  return rss({
    title: 'Example: latest articles',
    description: 'The latest articles published on Example.',
    site: context.site,
    items: posts
      .sort((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf())
      .slice(0, 30)
      .map((post) => ({
        title: post.data.title,
        pubDate: post.data.pubDate,
        description: post.data.description,
        link: `/blog/${post.id}/`,
      })),
  });
}

Add the autodiscovery tag to the <head> of your base layout.

Common mistakes

  • Dates in the wrong format or with no time zone: readers sort the articles incorrectly, or reject them.
  • pubDate rewritten on every edit: the article jumps back to the top for every subscriber at the slightest correction.
  • guid based on a URL that changes (edited title, switch to HTTPS, change of URL structure): the whole feed is republished.
  • Unescaped characters (&, <) in titles: the XML becomes invalid and the feed stops being read without anyone telling you.
  • Relative links and images in the content: they are broken outside the site.
  • Feed blocked by robots.txt, a firewall or bot protection: feed readers are bots. Check from a real reader.
  • Full-text feed of paywalled articles, or a feed that exposes drafts and scheduled content.
  • Changing the feed URL without a 301 redirect: subscribers are lost without a sound.

Frequently asked questions

Is an RSS feed still useful in 2026?

Yes, an RSS feed is still useful for a site that publishes regularly. It feeds feed readers and aggregators, automated newsletters and automation tools, and Google accepts it as a sitemap of recent content. Its direct audience is modest, but it costs very little to maintain and saves you from depending on a single platform to distribute your new content.

Does an RSS feed improve SEO?

An RSS feed does not improve rankings. It helps search engines discover new pages faster: Google accepts RSS 2.0 and Atom 1.0 feeds as sitemaps and recommends combining them with a complete XML sitemap, since the feed only describes recent URLs. The effect is on how quickly new content is crawled, not on where pages rank.

Should I put the full article or an excerpt in the feed?

Full content serves subscribers and automated newsletters, but reduces visits to the site and makes wholesale copying easier. An excerpt brings every read back to the site at the cost of less comfort. Choose according to your model: a well-crafted excerpt for a site funded by advertising or subscriptions, full content when loyalty and distribution come first.

RSS or Atom: which format should I choose?

Both formats are read by every feed reader and accepted by Google. RSS 2.0 is the most widespread; Atom 1.0 is stricter, with a mandatory identifier and update date for each entry. The simplest approach is to keep the format your CMS produces natively and check that it is valid.

How many articles should a feed contain?

No standard sets this number. Around twenty to fifty entries suits most sites: enough for a reader that polls the feed once a day to miss nothing, not so many that the file gets heavy. A site that publishes more than fifty articles a day would do well to offer feeds per section too.

Updated on

Topic checklist (PDF)

And now?

In the “Media and publishers” topic

  1. Follow the content policies of Google News and Discover
  2. Create a Google News sitemap
  3. Provide large images and max-image-preview:large
  4. Monitor the Discover and Google News reports
  5. Mark up paywalled content
  6. Publish a complete RSS or Atom feed
  7. Invite readers to add you as a Google preferred source
  8. Control third-party content (site reputation)