Discourse Sitemap

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

Features

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)

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.

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

61 个赞

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

3 个赞

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.

5 个赞

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.

2 个赞

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?
https://forum.dobreprogramy.pl/sitemap.xml

将主页添加到站点地图中会非常好。

小建议:

  1. 可以将其单独包含在 page_sitemap.xml 中(包含主页、隐私政策、服务条款和关于我们等页面)

目前,这些页面已在 Google 搜索控制台中以“已收录,但未提交至站点地图”的状态存在。

image

  1. 对于分类和标签页面,需要在插件设置中勾选以下选项。这些页面目前已在 Google 搜索控制台中显示为“已收录,但未提交至站点地图”。

a) 分类:在站点地图中添加“是”或“否”

b) 标签:在站点地图中添加“是”或“否”

注意:此选项将帮助希望关闭分类和标签页面抓取的用户。选择“否”后,这些页面将包含 {content=“noindex”}

  1. “图片站点地图”也有助于 Google 发现、抓取和索引图片。

在性能标签页的控制台报告中,可以查看图片在 Google 搜索中的表现情况。

4 个赞

@osioke 当我尝试添加站点地图时,显示无法获取。我正在为客户创建一个包含所有可用插件和功能的沙盒环境,而这是最重要的需求之一。

编辑:网站是 https://testghost.tk

这是因为该插件旨在帮助搜索引擎更快地索引您的网站。很抱歉,您的请求需要自定义插件。

1 个赞

帖子已拆分为新主题:如何正确使用站点地图?