Discourse Sitemap

Summary: Add sitemap.xml to your Discourse instance

:link: GitHub: https://github.com/discourse/discourse-sitemap
:arrow_right: Install: Follow the plugin installation guide.


There has been some discussion over the need of a sitemap, and I think Discourse doesn’t really need one, although I do believe that a forum might be indexed a bit faster with one.

Anyway, we created this plugin because of a customer that needed a sitemap for Google News, and this trick didn’t work because they were using Amazon S3 to store their uploads (which broke the same domain requirement)


Just enable it using the site setting in the Plugins menu, and you will get

  • /sitemap.xml
  • /news.xml
  • A Sitemap line in robots.txt

Do you need a sitemap?

No. You do not necessarily “need” a sitemap.xml file.

TL;DR You can get faster indexing with a sitemap, but it doesn’t necessarily make for better SEO.

If you have a very large site, this may benefit you by allowing for faster page indexing.


  • Add new bullets when major features are committed here



It has been pointed out to me that the lastmod tag on the Discourse sitemap.xml is always updated for sitemaps that do not contain topics that have been recently created, bumped, or edited. This can cause an issue if the sitemaps are being used by a custom crawler to index recently modified topics on the site.

I realize that sitemap_recent.xml will always be up to date, but additional sitemaps may or may not contain recently modified topics. Is setting the sitemap’s lastmod tag to a recent date even if no topics in the sitemap have been modified intentional? It looks like it happens in the || 3.days.ago condition here:

1 Like

My understanding is that we do fancy stuff like this to catch stuff that fell between cracks.

For example deletions mean nothing got bumped but a site map can change.


Sitemap Error:


in google console its showing below!

Sitemap status:


Same issue! How can i fix it?


How I can add into news.xml only some category
For example I have category :
Technical issue => I don’t want this into news.xml
News => I want only this one into news.xml