RSS a 66 redes sociales: Facebook, Instagram, X, LinkedIn, Telegram y más Blog Afiliados Contactos
Iniciar sesión Empezar gratis
Updated: 2026-11-02
Contao News RSS Feed: Set It Up in the Back End and Auto-Post

Short answer: Contao can create RSS and Atom feeds from its news archives without extra code. Define a news feed in the back end, choose the format, the news archives and the number of items, give it a short alias that becomes the file name, add the feed link to your page layout, make sure the base URL is your real https address and check the generated file with curl and a validator. Then connect that address to an auto-poster, so that every news item you publish is shared on your social networks.

Contao is a content management system with a long history in German-speaking countries and a loyal base of agencies and clubs. Its news extension is built around archives, and each archive can feed one or several RSS and Atom files. Unlike systems that build a feed on every request, Contao writes the feed as a file in a public folder and updates it when the news changes. That is fast and robust, but it has consequences: the feed is only as current as the last time it was generated, and the settings of the feed decide what readers and auto-posters see. This guide explains the settings that matter, the traps and a test routine.

Create the news feed

In the back end of Contao 4 and 5, the news module has a section for feeds next to the news archives. Create a new feed and fill in the fields that matter for social sharing:

SettingWhat to chooseWhy it matters
Title and descriptionThe name and a short sentence about the siteShown in feed readers and in some previews
AliasA short word such as newsIt becomes the file name of the feed
FormatRSS 2.0 or AtomBoth work with auto-posters; choose one and keep it
SourceTeaser only, or full textTeasers make short, clean social posts
Maximum itemsAbout twentyEnough for a poller, light for the server
Base URLYour real address with httpsAll links in the feed are built from it
News archivesOnly the archives that are publicKeeps internal or draft material out

The field names and labels differ slightly between versions and languages of the back end, so compare them with the documentation of the version you run. The choice between RSS and Atom is explained in the guide to Atom and RSS for auto-posting.

Write teasers on purpose

Auto-posters build the best social posts from a feed that gives them a short summary. In Contao, the teaser of a news item is the natural summary. Make it a habit that editors write a teaser for every item, in one or two complete sentences, and do not let the system cut the body automatically. If you choose the full text as the source of the feed, the whole article is placed in the description, which is useful for readers who follow the feed in an app, but a social post made from it may be long or messy. For the choice between the two see full text or excerpt in a feed. A teaser with an image gives the auto-poster a picture to use, and a teaser without one gives a plain text post.

Fix the base URL and the links

Every link in the feed is built from the base URL of the feed and the address of the news reader page. If the base URL is empty, wrong or uses http instead of https, the links will be wrong, and an auto-poster will share addresses that redirect or fail. Check three things: the base URL has the scheme and the domain and no trailing path; the news reader page that displays each article is set correctly in the archive; and the address works when you paste it into a browser. If your site answers under several domains, use the canonical one. A feed whose links redirect wastes every link and may look suspicious to readers.

Add the feed to the page layout

The page layout has an option to include news feeds. Select your feed there, and Contao adds the discovery link to the head of every page that uses the layout. A browser or a tool that only knows your home page can then find the feed on its own. Check the page source after saving: you should see a link element with the relation alternate, the RSS or Atom media type and the address of the feed file. The full explanation of discovery is in the guide to feed autodiscovery. If several layouts exist, make sure the important ones include the link, because a layout without it hides the feed from tools.

Understand where the file lives

Contao stores the generated feed in a public folder, usually called share, inside the public directory of the installation. The feed address is the domain, the folder and the alias with the file extension, so a feed with the alias news would be reachable at an address of the form /share/news.xml. Because it is a static file, the web server delivers it directly, with the validator headers that the server adds for files, and it costs almost nothing per request. The file is regenerated when news items are saved, and a scheduled task can rebuild all XML files periodically; the command line tool of Contao can also run that task by hand. List the available tasks of the automator with the console tool of your version, and run the one for XML files after you change the settings of a feed.

php vendor/bin/contao-console contao:automator
curl -I https://example.com/share/news.xml

If the file does not appear, check that the folder is writable by the web server user and that the feed has at least one archive with published items. After a deployment or a restore, regenerate the files, because the folder may not be part of your deployment package.

Dates and publishing time

Contao news items have a date and an optional publishing period. The date of the item becomes the publication date in the feed, so set it when the article goes live, and avoid editing it later for old articles. Items that are not yet published or no longer published do not belong in the feed, and the system takes care of that when it regenerates the file. Because the feed is a file, an item that has a future start time appears only after the file is rebuilt after that time, so make sure that the scheduled task runs often enough, otherwise the new article will be late. For the effect of dates on auto-posting see the guide to feed order and backdated posts, and for repeated posts why a feed auto-posts the same article twice.

Several feeds and several languages

A site with several news archives, for example one for the club and one for the youth team, can offer one feed per archive or a combined feed. Separate feeds make routing easy: club news to the Facebook Page, youth news to a parents’ channel. Routing is explained in category filtering for auto-posting. For a multilingual site, create a feed for each language with its own alias and its own archive, and set the language in the feed. A feed that mixes languages makes an auto-poster share the same story several times in a row, and readers will call it spam.

Images, encoding and special characters

News items often contain an image, and the feed can carry it as an enclosure or inside the teaser, depending on the version and the settings. Check that the image address in the feed is absolute and public, because a relative path or a file in a protected folder gives readers and auto-posters nothing to show. Contao writes the feed in UTF-8, so names with umlauts and other accented letters are safe, but pasted text from office programs can still contain control characters that XML forbids. If the validator reports an invalid character, find it in the teaser, remove it and regenerate the file. See why special characters and emoji break feeds for the details.

Moving, restoring and updating the site

Because the feed is a generated file, it is easy to forget it when the site moves. After a migration to a new server, a restore from a backup or a major update, check that the folder for generated files exists and is writable, regenerate the feeds and open the address in a browser. If the domain changes, update the base URL of every feed, because links built from the old domain would keep pointing to a site that no longer answers. Tell the person who maintains your auto-poster whenever the address of a feed changes, and keep a redirect from the old address if you can, so that nothing is missed.

Test the feed

Request the feed from outside your network, because a local test says nothing about the certificate and the caches in front of your server.

curl -i https://example.com/share/news.xml
curl -I https://example.com/share/news.xml
  • The response is 200, the content type is an RSS or Atom type and the body starts with an XML declaration.
  • Every link is absolute, uses https and opens the right news article.
  • A draft or an item with a future start time does not appear.
  • Paste the address into the W3C Feed Validation Service and fix every error.
  • Publish a news item, check that the file is regenerated and confirm that the new item comes first.

A longer routine is in the feed validation guide, and a shorter one in debugging a feed with curl.

Common mistakes to avoid

  • An empty or wrong base URL. Links point to the wrong address or to http.
  • No teaser. Social posts are empty or cut in the middle of a sentence.
  • A stale file. The feed is not regenerated after a change or a deployment.
  • A feed without a layout link. Tools cannot discover it.
  • Internal archives in a public feed. Select only the archives that readers may see.
  • Edited dates on old items. Old articles move to the top and are shared again.

How PostRSS works with a Contao feed

PostRSS has been publishing RSS and Atom feeds to social networks since 2014. Paste the address of your feed, connect your accounts and choose how each post is built from the title, the description or the page title. PostRSS checks the feed as often as every minute and shares each new entry, with its image and link, to the channels you choose among 66 supported networks, messengers, team chats and blogs, including LinkedIn, X, Bluesky, Mastodon and Telegram. Keyword filters, UTM parameters and posting windows let you tune each channel. See the PostRSS features page and the plan limits on the pricing page. More developer guides are under the Technical Guide tag.

Lectura relacionada

The bottom line

A Contao feed is a set of options and a generated file, and it has to get the details right: the right archives, a teaser for every item, the real https base URL, a layout that links to the feed, dates that are set once and a file that is regenerated whenever the news changes. Test the live address with curl and a validator, then connect it to an auto-poster. After that, every news item your editors publish reaches your readers and your social channels without extra work.

FAQ

Does Contao create RSS feeds?

Yes. The news extension can generate RSS and Atom feeds from news archives, and the feed is written as a file in a public folder.

Why are the links in my feed wrong?

The base URL of the feed is probably empty or wrong. Set your real https address, regenerate the file and check the links again.

Should the feed contain teasers or full text?

Teasers are usually better for social sharing, because they give short and clean posts. Full text suits readers who follow the feed in an app.

Why does a new news item not appear in the feed?

The file may not have been regenerated yet. Save the item again, run the task for XML files or check that the scheduled task runs often enough.

Can PostRSS read a Contao feed?

Yes. PostRSS reads any valid RSS or Atom address that is reachable without a login. Paste the address, connect your channels and new news items are shared as soon as they appear.

New guides, once a month

What changed in the networks, what broke, and how to fix it before it costs you reach.

We send a confirmation e-mail first. Unsubscribe any time.

Más herramientas de nuestro equipo

Creadas por Internet Solutions, el equipo detrás de PostRSS. Cada una te ahorra tiempo a su manera.