We are experiencing some issues with the sitemap generated by Ghost ( self hosted ). Response showing blank white page while status code is 200
.
How can I fix it? Thanks.
Looks like you’re running Ghost in a subdirectory, right?
I’d argue that the issue is with the proxying then. How do the requests get routed? Do they actually hit your Ghost instance?
When you open the sitemap, Ghost should log this in the server logs like this:
INFO "GET /sitemap.xml" 200 3ms
Does that happen? If not, you need to go “upstream” in your proxy chain to check for issues.
I’ve seen it happen a couple of times that someone entered canonical urls for each and every post they made. Which causes Ghost not to display them in the sitemap. If that’s you, you’ll want to remove them. Don’t set canonical_url to the post’s own URL. Ghost does that automatically, and doing so manually causes Ghost to decide that your page isn’t canonical and shouldn’t appear in the sitemap.
Jannis is probably right, but I’ve seen the problem above just enough times to mention it…
I don’t think the canonical url is causing the problem because earlier it’s showing. Even i removed the canonical url from the post level hence it shows the blank screen.
To me, that shows that some routing stuff is going on there – but honestly, not sure what.
Any change you’re not actually using a subdirectory setup, but you use Ghost as headless CMS?
This looks like the Content API wants to query posts by slug – with the slug being “sitemap.xsl”, which well…is not a post that exists.
You really need to look into your setup. In standard Ghost installations, this should work. Unless you tell us a little bit more on how you’re using Ghost, it’s hard for us to help, unfortunately.