Enabling and Customizing Contao Blog RSS Feeds – A Practical How‑to
Learn how to turn on Contao’s built‑in RSS feed for a Blog module, tweak the output template, validate the feed, and recover from common pitfalls. A concise, step‑by‑step guide for developers and site owners.
05 Jan 2026, 17:04 UTC

Desired Outcome
The goal is to have a functional, standards‑compliant RSS feed for a Contao Blog module that can be accessed at a predictable URL (e.g., /blog/feed/). The feed should include only published articles, respect publication dates, and be easily customizable via the feed.html5 template.
Prerequisites
- Contao 5.x or newer with the Blog module installed.
- Administrative access to the Contao backend.
- Basic understanding of Contao’s module configuration and template system.
- Optional: a local or staging instance for testing before deploying to production.
Step‑by‑Step Procedure
1. Enable the RSS Feed in the Blog Module
- Log in to the Contao backend.
- Navigate to Modules → Blog and open the module you want to expose.
- Switch to the Feed tab.
- Check Generate RSS feed (checkbox).
- Verify the Feed URL field. By default it is
/blog/feed/. If your Blog module alias differs, adjust accordingly. - Save the module settings.
2. Verify Basic Feed Availability
- Open a browser and navigate to the feed URL (e.g.,
https://example.com/blog/feed/). - Confirm the response is XML and that the root element is
<rss>. A quick check can be done with W3C Feed Validation Service. - If the feed returns a 404 or empty content, double‑check that the module alias matches the URL and that the feed option is still enabled.
3. Add Test Articles to Populate the Feed
- Create a new Blog article.
- Set its status to Published and choose a publication date in the past.
- Optionally assign a category or author to later test query‑parameter filtering.
- Publish the article and clear the Contao cache (see Recovery Options).
- Refresh the feed URL; the new article should appear in the
<item>list.
4. Customize the Feed Output with a Template
- In the backend, go to Templates → List and locate
feed.html5. If it does not exist, create a new template based on the defaultfeed.html5. - Open the template for editing.
- Make desired changes. For example, to prepend a custom header to every item, add:
- Save the template.
- Return to the Blog module settings, open the Feed tab, and in the Feed template field type
feed.html5(or your custom name). - Clear the Contao template cache:
php vendor/bin/contao-console contao:cache:clear(requires CLI access). - Reload the feed URL to see the updated output.
<item>
<title>[Custom] <?php echo $this->title; ?></title>
<description>[Custom] <?php echo $this->description; ?></description>
<link><?php echo $this->link; ?></link>
</item>
5. Enable Caching for Performance (Optional)
- In the Blog module’s Feed tab, enable Cache feed if available.
- Alternatively, install the Contao Cache 2.0 extension and configure it to cache the feed URL.
- Verify that subsequent requests to the feed URL return the same XML without regenerating the feed each time.
6. Test Query‑Parameter Filtering
- Assuming you have an article tagged with the category alias
tech, request the feed with a filter:https://example.com/blog/feed/?category=tech. - Only items belonging to that category should appear.
- Repeat for
?author=johnto filter by author alias.
Expected Checks
- The feed URL returns
200 OKandapplication/xmlcontent type. - The XML validates against RSS 2.0 via an online validator.
- Only articles with Published status and a past publication date appear.
- Custom template changes are reflected after clearing the template cache.
- Cache settings reduce server load and maintain consistent output.
Recovery Options
- Feed not showing or 404 – Disable the Generate RSS feed option, clear the cache, then re‑enable to reset the route.
- Template changes not applied – Clear the template cache via CLI or backend System → Cache → Clear all.
- Feed includes drafts – Verify that all articles intended for the feed are set to Published and have a valid publication date.
- Feed URL changed due to custom routing – Check any custom route definitions in
config.phpor the System → Routing backend module.
Limitations & Notes
- Contao’s default feed URL may vary if the Blog module alias was altered during installation.
- Custom templates require a cache clear to take effect; otherwise the default template will still serve.
- Only articles marked as Published and with a valid date are included; drafts or future‑dated articles are omitted.
- When using a dedicated caching extension, ensure it is compatible with the Contao version in use.
Conclusion
By following this guide you can reliably expose a Contao Blog module as an RSS feed, tailor its appearance with a custom template, and validate the output. The steps cover common pitfalls and provide clear recovery paths, ensuring your feed remains functional and performant across Contao releases.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.