Discourse Sitemap

:information_source: It is no longer necessary to install this plugin separately as it was merged into Discourse core in version 2.9.0.beta4

:discourse2: Summary Discourse Sitemap adds a sitemap.xml to your Discourse instance
:hammer_and_wrench: Repository Link https://github.com/discourse/discourse-sitemap
:open_book: Install Guide This is now merged with Discourse core, so no need to install it separately.


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



Sorry about that. With the fix added on your repo, I’ll just remove this one.


I am also doing the changes on Sitemap plugin. I will create a new PR soon. Currently I am working on the 4 points which are recommended by @sam in previous post.


I guess the problem is that it is never able to even render first time around.

grabbing 50K topics can take a while, I would try a pluck there instead of a select cause it would be much faster

Short of that a site setting to limit the size cause maybe smaller batches are needed … not sure.


the sitemap plugin of discourse do not update the sitemap urls to https:// (as usually seen in wordpress). It still shows http://. Please solve this issue. As it helps in faster https:// indexing after migrating to SSL

I only post 1 photos 1 topic

Hi, what could be the reason I get error 502 bad gateway on my sitemap?

It would be great for adding homepage in sitemap.

Small Suggestions:

  1. It can be include in separate as page_sitemap.xml (include pages like Hompage, Privacy, TOS and About)

Currently these pages are already in google console in this type (Indexed, not submitted in sitemap)


  1. For category and tag pages below tick option need to include in plugin settings. These pages already included in google console as (Indexed, not submitted in sitemap)

a) Category: add in sitemap “Yes” or “No”

b) Tags: add in sitemap “Yes” or “No”

Note: this option will help to who want to turn off crawl category and tags pages. After select option “No” these pages include {content="noindex}

  1. “Image sitemap” also very helps to google to discover, crawl and index images.



In performance tab console reports shows, how images perform in google search.



@osioke when i try to add sitemap it shows couldn’t fetch , i am trying to create a sandbox for my client with all available plugins and features, and this is one of the most important requirements

Edit : website is https://testghost.tk

This is because this plugin is designed to help search engines index your site faster. Your request will require a custom plugin I’m afraid.

1 Like