# Discourse Sitemap

**URL:** https://meta.discourse.org/t/discourse-sitemap/40348
**Category:** Plugin
**Tags:** sitemap, deprecated, included-in-core
**Created:** [February 29, 2016, 8:20pm UTC](https://meta.discourse.org/t/discourse-sitemap/40348 "2016-02-29T20:20:15Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Discourse](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discourse/32/148734_2.png) [@Discourse](https://meta.discourse.org/u/Discourse)
#### Post date: [February 29, 2016, 8:20pm UTC](https://meta.discourse.org/t/discourse-sitemap/40348/1 "2016-02-29T20:20:15Z")

</div>

| | | |
| --- | --- | --- |
| :discourse2: | **Summary** | **Discourse Sitemap** adds a sitemap.xml to your Discourse instance |
| 📖 | **Install Guide** | **This plugin is bundled with Discourse core**. There is no need to install the plugin separately. |

### Features

There has been [some](https://meta.discourse.org/t/how-to-create-xml-sitemap-is-there-any-plugin/33654) [discussion](https://meta.discourse.org/t/sitemap-xml-for-google-webmaster/9054/9) 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](https://meta.discourse.org/t/creating-and-submitting-xml-sitemaps-to-google-bing-yandex/22655) didn’t work because they were using Amazon S3 to store their uploads (which broke the same domain requirement)

### Configuration

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.

> <https://webmasters.stackexchange.com/questions/4803/the-sitemap-paradox/5151#5151>

**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.

### CHANGELOG

- Add new bullets when major features are committed here

### TODO

- Including a XSLT to display it more nicely to humans ([should be local due to same origin policy](http://stackoverflow.com/a/7529105/1632545)) so we should have a way to register an asset that is [accessible as a separate file](https://meta.discourse.org/t/register-an-asset-for-external-site-consumption/34897).

---

<div class="post-metadata">

### Author: ![DanielMarquard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/danielmarquard/32/74010_2.png) [@DanielMarquard](https://meta.discourse.org/u/DanielMarquard)
#### Post date: [January 6, 2017, 10:10pm UTC](https://meta.discourse.org/t/discourse-sitemap/40348/21 "2017-01-06T22:10:05Z")

</div>

> [@RGJ](#):
>
> BTW I do appreciate your fixes but please leave any copyright notices intact when you fork something. I mean, you removed a single character in the code and that warranted to change the copyright and the URL in the sitemap files?

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

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [February 13, 2017, 6:42pm UTC](https://meta.discourse.org/t/discourse-sitemap/40348/41 "2017-02-13T18:42:19Z")

</div>

> [@RGJ](#):
>
> We’re going to change the Sitemap plugin

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](https://meta.discourse.org/t/discourse-sitemap-plugin/40348/32).

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [February 28, 2017, 5:07pm UTC](https://meta.discourse.org/t/discourse-sitemap/40348/61 "2017-02-28T17:07:47Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Pramvir\_Rathee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pramvir_rathee/32/120136_2.png) [@Pramvir\_Rathee](https://meta.discourse.org/u/Pramvir_Rathee)
#### Post date: [December 2, 2017, 8:58pm UTC](https://meta.discourse.org/t/discourse-sitemap/40348/81 "2017-12-02T20:58:33Z")

</div>

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

---

<div class="post-metadata">

### Author: ![thaidb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thaidb/32/68488_2.png) [@thaidb](https://meta.discourse.org/u/thaidb)
#### Post date: [July 24, 2018, 5:29pm UTC](https://meta.discourse.org/t/discourse-sitemap/40348/101 "2018-07-24T17:29:57Z")

</div>

I only post 1 photos 1 topic

---

<div class="post-metadata">

### Author: ![TomekB](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tomekb/32/66593_2.png) [@TomekB](https://meta.discourse.org/u/TomekB)
#### Post date: [May 22, 2019, 11:05am UTC](https://meta.discourse.org/t/discourse-sitemap/40348/121 "2019-05-22T11:05:12Z")

</div>

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

> **[dobreprogramy - strona główna](https://www.dobreprogramy.pl/)**
>
> Największy polski serwis o nowych technologiach - aktualności, oprogramowanie, publikacje, demonstracje, wideo, testy s…

---

<div class="post-metadata">

### Author: ![PoojaPatel](https://avatars.discourse-cdn.com/v4/letter/p/edb3f5/32.png) [@PoojaPatel](https://meta.discourse.org/u/PoojaPatel)
#### Post date: [March 9, 2020, 7:47am UTC](https://meta.discourse.org/t/discourse-sitemap/40348/141 "2020-03-09T07:47:52Z")

</div>

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)

![image](https://global.discourse-cdn.com/meta/original/3X/2/b/2b8a3b0935284f1519381f33ce83dd3f6d190a6e.png)

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.

> **[Image Sitemaps | Google Search Central  |  Documentation  |  Google for...](https://developers.google.com/search/docs/crawling-indexing/sitemaps/image-sitemaps?hl=en&visit_id=639159120434200104-2292305213&rd=1)**
>
> Image sitemaps help Google discover images. Follow these best practices on how to create an image sitemap and review image sitemap examples.

> **[Image SEO Best Practices | Google Search Central  |  Documentation  |  Google...](https://developers.google.com/search/docs/appearance/google-images?visit_id=639159120458098794-2639978059&rd=1)**
>
> Google Search helps users visually discover information on the web. Explore image SEO best practices such as image captions and badges.

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

 ![image](https://global.discourse-cdn.com/meta/original/3X/f/9/f95c9c148753d47bd1919041107bac4bd83c7e5a.png)

---

<div class="post-metadata">

### Author: ![pinder99](https://avatars.discourse-cdn.com/v4/letter/p/dfb087/32.png) [@pinder99](https://meta.discourse.org/u/pinder99)
#### Post date: [December 2, 2020, 4:37pm UTC](https://meta.discourse.org/t/discourse-sitemap/40348/161 "2020-12-02T16:37:56Z")

</div>

@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

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/f/0f4d471037d3645705bae928fc2e6128139d872b.jpeg)

Edit : website is [https://testghost.tk](https://testghost.tk)

---

<div class="post-metadata">

### Author: ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)
#### Post date: [July 18, 2021, 2:50pm UTC](https://meta.discourse.org/t/discourse-sitemap/40348/180 "2021-07-18T14:50:35Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [August 13, 2024, 5:22pm UTC](https://meta.discourse.org/t/discourse-sitemap/40348/208 "2024-08-13T17:22:54Z")

</div>

A post was split to a new topic: [How to use the sitemap properly?](https://meta.discourse.org/t/how-to-use-the-sitemap-properly/321496)
