Not a bug SubSitemap in XenForo 2 cannot be browsed by Google

Evaelis

Active member
Affected version
v2.0.5
Hello,

First of all, this kind of is a duplicate of a past bug-report in 1.x: https://xenforo.com/community/threa...map-pending-due-to-query-string-param.134873/

With the new Google Search Console, more information are displayed about the errors encountered.
What used to look like this:
1528998017047.webp
Now looks like this:
1528997395923.webp


The sitemap was not pending, but failing because of an "HTTP General Error".
Yet you can browse this partial sitemap at https://forum.cheat-gam3.com/sitemap.php?c=1 or https://forum.cheat-gam3.com/sitemap/1.xml
Now let's do an experiment and rewrite /sitemap/n.xml to sitemap.php?c=n1528997491496.webp

Works like a charm. Yet the headers and body of the HTTP Response are exactly the same:
> curl -I https://forum.cheat-gam3.com/sitemap/3.xml

HTTP/1.1 200 OK
Server: nginx/1.6.2
Date: Thu, 14 Jun 2018 17:35:13 GMT
Content-Type: application/xml; charset=utf-8
Connection: keep-alive
X-Frame-Options: SAMEORIGIN
X-Robots-Tag: noindex
Content-Encoding: gzip
Content-Disposition: inline; filename="sitemap-3.xml"
> curl -I https://forum.cheat-gam3.com/sitemap.php\?c\=3

HTTP/1.1 200 OK
Server: nginx/1.6.2
Date: Thu, 14 Jun 2018 17:35:20 GMT
Content-Type: application/xml; charset=utf-8
Connection: keep-alive
X-Frame-Options: SAMEORIGIN
X-Robots-Tag: noindex
Content-Encoding: gzip
Content-Disposition: inline; filename="sitemap-3.xml"

I do believe the problem comes from XenForo itself and the fact that it uses query parameters, however, I also believe that there should be way more persons complaining if this was the case.
I can't seems to find any documentation explaining this problem.
What is going on? Does the problem comes from my configuration? Does it comes from the query parameter?

Sincerely,
Evaelis
 
You need to enable "Full friendly URLs" to remove the query string parameters. We automatically rewrite the sitemap URLs in that case.

You can see the effect this has if you browse to:

https://xenforo.com/community/sitemap.xml

They aren't rewritten by us manually on the server, the software does this when friendly URLs are enabled.
 
You need to enable "Full friendly URLs" to remove the query string parameters. We automatically rewrite the sitemap URLs in that case.

You can see the effect this has if you browse to:

https://xenforo.com/community/sitemap.xml

They aren't rewritten by us manually on the server, the software does this when friendly URLs are enabled.
Right now, I am not using friendly URLs. I'll change that as soon as possible. Thanks for pointing out that the "fix" from XF1 was implemented in XF2.
Maybe it would be a good idea to note here (https://xenforo.com/help/friendly-urls/) that sitemaps are not being processed correctly by Google if Friendly URLs are not enabled.
 
Back
Top Bottom