An RSS feed is a file that lists your website's newest content in a format that readers and other websites can automatically check
An RSS feed is a straightforward text file that sits on your server and tells other people's apps and websites what you've published and when. Instead of visitors checking your site manually, they subscribe to your feed once, and their reader automatically pulls in your latest posts, articles, or updates. You create the feed by writing XML code that follows RSS standards, then upload it to your server where people can find it.
The feed itself is just a list: the title of each post, a link to it, the publication date, and optionally a summary. When someone subscribes, their RSS reader (an app or website) checks your feed on a schedule you set — every hour, every day, whatever you choose — and shows them anything new. This matters because it gives your readers a way to stay informed without relying on social media algorithms or email, and it gives other websites a way to republish your headlines with permission.
Key Takeaways
- An RSS feed is an XML file that lists your newest posts with titles, links, dates, and summaries in a standard format that readers and aggregators can automatically check.
- You can hand-write the XML code for a small site, use a static site generator like Hugo or Jekyll to build it automatically, or use a CMS like WordPress that generates feeds by default.
- The feed file must live at a predictable URL on your server, usually something like yoursite.com/feed.xml or yoursite.com/rss.xml, so people can find and subscribe to it.
- Each post in your feed needs a title, a link back to the full article, a publication date in the correct format, and optionally a summary or the full text.
- After you publish your feed, test it with a feed validator to catch XML errors before people try to subscribe.
Understanding the RSS XML structure
An RSS feed is written in XML, which is a way of marking up text so that computers can understand what each piece means. You don't need to be an XML informed — the structure is straightforward and repetitive. Every RSS feed has the same basic shape: a root element called <rss>, inside that a <channel> that describes your site, and inside that a list of <item> elements, each one representing a single post.
The channel section comes first and holds information about your site as a whole: the title of your site, a link to your homepage, a description, the language, and your contact email. Then each item represents one post. Every item needs at least a title, a link, and a publication date. The date must be in a specific format called RFC 2822, which looks like this: Mon, 15 Jan 2024 09:30:00 +0000. If the date is wrong or missing, readers' apps may not sort your posts correctly.
Here's a minimal example of what the structure looks like:
<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0"> <channel> <title>My Website</title> <link>https://mysite.com</link> <description>Articles about web development</description> <item> <title>How to Build a Contact Form</title> <link>https://mysite.com/contact-form</link> <pubDate>Mon, 15 Jan 2024 09:30:00 +0000</pubDate> <description>A step-by-step guide to building a working contact form.</description> </item> </channel> </rss>
Creating a feed by hand for a small site
If your site has only a handful of posts and you update it infrequently, you can write the RSS feed file directly in a text editor. Create a new file, name it feed.xml or rss.xml, and paste in the XML structure above. Then add one <item> block for each post on your site, filling in the title, link, date, and description.
Save the file and upload it to the root of your web server — the same directory where your homepage lives. Then test the feed by opening it in your browser. You should see the raw XML code. If you see an error message instead, check that every opening tag has a matching closing tag and that all special characters like &, <, and > are properly escaped (use &, <, and > instead).
The downside of hand-writing is that every time you publish a new post, you have to manually add a new item block to the feed file and re-upload it. For a site with more than a few posts or frequent updates, this becomes tedious and error-prone.
Generating feeds automatically with static site generators
If you build your site with a static site generator like Hugo, Jekyll, or Eleventy, the tool can create your RSS feed automatically as part of the build process. You write your posts in Markdown or another straightforward format, and the generator reads the title, date, and content from each file, then outputs a complete RSS feed file.
In Hugo, you typically don't need to do anything — the feed is generated by default and lives at /index.xml. In Jekyll, you add the jekyll-feed plugin to your configuration file, and it generates the feed at /feed.xml. In Eleventy, you write a template that loops through your posts and outputs the XML structure, then tell Eleventy to treat that template as a data file.
The advantage is that your feed stays in sync with your posts automatically. Every time you build your site, the feed is regenerated with the latest content. You don't have to remember to update it manually, and you can't accidentally leave out a post or publish the feed before you meant to.
Using a CMS to publish feeds automatically
If you use a content management system like WordPress, Drupal, or Ghost, the feed is usually already built in and published automatically. WordPress generates feeds at /feed/ and /feed/rss2/ by default. Ghost publishes at /rss/. You don't write any code — the CMS handles the XML generation and keeps it updated every time you publish a post.
Most CMS platforms let you customize what goes into the feed through settings or plugins. You can choose whether to include the full post text or just a summary, set how many recent posts to include, and add custom fields. Some platforms also let you create multiple feeds — one for all posts, one for a specific category, one for a specific author — so readers can subscribe to just the content they care about.
If you're using a CMS, check the documentation or settings panel to find where your feed URL is published. Then test it to make sure it's working before you tell people about it.
Publishing your feed at a discoverable URL
Your feed needs to live at a URL that people can find and remember. The most common locations are yoursite.com/feed.xml, yoursite.com/rss.xml, or yoursite.com/feed/. Pick one and stick with it — if you move the feed to a different URL later, anyone who subscribed to the old URL will stop receiving updates.
You should also add a link to your feed in the <head> section of your homepage HTML. This line tells browsers and feed readers where to find your feed:
<link rel="alternate" type="process/rss+xml" href="https://yoursite.com/feed.xml" />
When someone visits your site in a browser that supports feed discovery, they'll see a feed icon in the address bar or a notification that a feed is available. This makes it much easier for people to find and subscribe to your feed without having to guess the URL.
Testing your feed with a validator
Before you announce your feed to the world, test it with an RSS validator. The W3C Feed Validator at validator.w3.org/feed/ is free and widely used. Paste your feed URL into the validator, and it will check for XML errors, missing required fields, and formatting problems.
Common errors include dates in the wrong format, unescaped special characters, missing closing tags, and descriptions that are too long or contain HTML that isn't properly wrapped in CDATA sections. The validator will tell you exactly which line has the problem and what to fix. Once the validator shows no errors, your feed is ready to share.
Even if your feed validates, test it in an actual RSS reader app to make sure the posts appear correctly and in the right order. Popular readers include Feedly, Inoreader, and NetNewsWire. Subscribe to your own feed and check that new posts show up within a few minutes of publishing.
Frequently Asked Questions
What's the difference between RSS and Atom?
RSS and Atom are two competing standards for publishing feeds. RSS is older and more widely supported, while Atom is newer and technically more rigorous. Most readers support both, so you can publish either one. If you want to publish both, you can create two separate feed files or use a tool that generates both from a single source.
Can I include images or HTML in my feed?
Yes, but you need to wrap the content in a CDATA section so the XML parser doesn't get confused by the special characters. A CDATA section looks like this: <![CDATA[ <img src="image.jpg"> ]]>. Everything inside the CDATA tags is treated as plain text, not XML.
How often do readers check my feed?
That depends on the reader app, not on you. Most readers check feeds every 15 minutes to an hour, though some let users set a custom interval. You can't control when readers check, but you can make sure your feed is always available and up to date when they do.
Do I need to update my feed manually every time I publish a post?
Only if you're hand-writing the XML. If you use a static site generator or CMS, the feed is updated automatically as part of your publishing workflow. Hand-writing is only practical for sites with very few posts.
What should I put in the description field of each item?
You can use a short summary of the post, the first paragraph, or the full post text. Summaries are shorter and load faster, while full text lets readers decide whether to click without leaving their reader app. Choose whichever matches how your audience prefers to consume content.