Discourse Sitemap Plugin


(Richard - DiscourseHosting.com) #68

I have merged your PR, thank you very much.

I see one possible problem where changing the sitemap_topics_per_page setting will keep using the cached data with the old sitemap size. It might be a good idea to use the sitemap_topics_per_page value as a part of the cache key.


(Vinoth Kannan) #69

Good point. Created the PR


(Mitchell Krog) #70

Just installed this today to try it out. Looks good so far and Google reported no issues with the format. Good work guys.


(Mitchell Krog) #71

Ok already found an issue. Had someone comment on an article today and the sitemap shows the article as last updated on the 17th of March ???

<loc>
https://photographic.community/t/revisiting-old-images-and-re-processing-them-6-years-later/92
</loc>
<lastmod>2017-03-17T10:59:14Z</lastmod>

(Vinoth Kannan) #72

Currently system generating sitemap once in 24 hours only. So it is not a bug. You are viewing cached output. It will be changed in next 24 hours.


(Mitchell Krog) #73

Excellent, thanks so much for the explanation.


Xml sitemap with ssl forum
(Hosein Naseri) #74

I’m using sitemap plugin with my forum that I prefer to be loaded with https. However the http protocol is also available and not turned off. How can I tell the sitemap plugin to add the ssl version of urls? currently all links in the sitemap begin with http.


(Rafael dos Santos Silva) #75

By default a lot of Discourse internals will use HTTP until you check force_https. You should do that if your site works on HTTPS you shouldn’t allow HTTP anymore.


(Hosein Naseri) #76

But I want the http to be available. because I have implemented the forum in my android application, However since older android versions have some issues with some ssl protocols, I do my api calls with http protocol. I don’t know if i enable force_https, am I able to still use http protocol in my api calls?


(Rafael dos Santos Silva) #77

Oh I see that’s a pretty strict requirement. Looks like in your case there is no way out.

Those are Androids below 4.3 ?


(Hosein Naseri) #78

I think so.

Since I’m really fine with not force_https ing my forum, I think an option for this plugin to list ssl urls would be the best thing for me.


(Vinoth Kannan) #79

I guess you should customize this plugin little bit for your requirements.


(Richard - DiscourseHosting.com) #80

Note: It seems like the caching mechanism is broken in Rails 5.

Looking into it later today, trying to get a fix out by today or tomorrow.
In the meanwhile: input and suggestions are welcome :slight_smile:
Details here HTTP ERROR 500 in my site · Issue #5 · discoursehosting/discourse-sitemap · GitHub

EDIT found it. render :text is deprecated in Rails 5 - should be render :plain instead. Pushed a fix.


Sitemap.xml for Google Webmaster
(Chaudhary) #81

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


(Jay Pfaffman) #82

The better place to post this would be in the Discourse Sitemap Plugin topic.

Have you enabled the force https site setting?

@rgj, this might be worth a look.


(Chaudhary) #83

yes force https is enabled.


(Richard - DiscourseHosting.com) #84

The sitemap code uses Discourse.base_url so there is no bug there.

If you recently enabled force_https then you might be looking at the old (cached) sitemap.

The easiest way to get around that, is to change the sitemap_topics_per_page. Even a slight change is enough, for example from 10000 to 9999. This will cause the plugin to stop looking at the cache.


(Vaibhav Mule) #85

I have installed it but it does not generate /newssitemap.xml?


(Vinoth Kannan) #86

You should try above.


(Vaibhav Mule) #87

Thanks, but why it is not mentioned in robots.txt?