Fixed Sitemaps ping is deprecated

Affected version
2.2.13
This morning I got an unusual error in my XenForo log, which suggests that the forum software might need a fix (I'm currently using the latest public release of XF 2.2.13).

Code:
     GuzzleHttp\Exception\ClientException: Error submitting sitemap to https://www.google.com/webmasters/tools/ping?sitemap=https%3A%2F%2Fwww.MYSITE.co.uk%2Ftalk%2Fsitemap.php: Client error: `GET https://www.google.com/webmasters/tools/ping?sitemap=https%3A%2F%2Fwww.ispreview.co.uk%2Ftalk%2Fsitemap.php` resulted in a `404 Sitemaps ping is deprecated. See https://developers.google.com/search/blog/2023/06/sitemaps-lastmod-ping.` response: <HTML> <HEAD> <TITLE>Sitemaps ping is deprecated. See https://developers.google.com/search/blog/2023/06/sitemaps-lastmod (truncated...) src/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113

The key bit is "404 Sitemaps ping is deprecated" and that link to the related blog post:


I guess XenForo hasn't been updated to use the lastmod alternative yet?
 
Forgive me, I just realised somebody else posted this a few minutes before me:

 
After that add this to your robots.txt
Shouldn't Xenforo be doing stuff like that automatically? I need to login to the server with SSH and find and edit that file? I don't see it in the ACP. I also don't see it in the folder I installed XF in, nor the parent /home/nginx/domains/mysite.com/.
 
Shouldn't Xenforo be doing stuff like that automatically?
No. A robots.txt is not required to run XenForo and XenForo might not be the only Software running on a website or might not have control over the website root.

If you want to use a robots.txt (highly recommended) that's your responsibility.

But as said before, it's not required for Google to use the sitemap, you could submit the sitemap once via Search Console manually.
Once this is done Google knows the sitemap as well and will check it as they see fit.

Just my 0,02 €
 
Either way works but any robot that can read a robots.txt file will be able to see the sitemap path. The big 3; Bing, Google & Yandex are what I would guess most forum owners manage manually.
 
This morning I got an unusual error in my XenForo log, which suggests that the forum software might need a fix (I'm currently using the latest public release of XF 2.2.13).

Code:
     GuzzleHttp\Exception\ClientException: Error submitting sitemap to https://www.google.com/webmasters/tools/ping?sitemap=https%3A%2F%2Fwww.MYSITE.co.uk%2Ftalk%2Fsitemap.php: Client error: `GET https://www.google.com/webmasters/tools/ping?sitemap=https%3A%2F%2Fwww.ispreview.co.uk%2Ftalk%2Fsitemap.php` resulted in a `404 Sitemaps ping is deprecated. See https://developers.google.com/search/blog/2023/06/sitemaps-lastmod-ping.` response: <HTML> <HEAD> <TITLE>Sitemaps ping is deprecated. See https://developers.google.com/search/blog/2023/06/sitemaps-lastmod (truncated...) src/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113

The key bit is "404 Sitemaps ping is deprecated" and that link to the related blog post:

I guess XenForo hasn't been updated to use the lastmod alternative yet?
same error for me as well
 
No. A robots.txt is not required to run XenForo and XenForo might not be the only Software running on a website or might not have control over the website root.

If you want to use a robots.txt (highly recommended) that's your responsibility.

But as said before, it's not required for Google to use the sitemap, you could submit the sitemap once via Search Console manually.
Once this is done Google knows the sitemap as well and will check it as they see fit.

Just my 0,02 €
robots.txt goes in the home Xenforo installation folder right? /home/nginx/domains/domain.com/public/robots.txt - the one wth sitemap.php, admin.php, 4xx.html, etc.
So it could easily be included in the XF files you download with a Sitemap: https://www.site.com/sitemap.php text in it no? How can XF not have control over that folder?
I think it's not necessary though since sitemap.php can already be read by bots?
 
No, not necessarily.

robots.txt must be accessible from domain root - that might or might not be the same folder as XenForo is installed to, totally depends on your setup.

So it could easily be included in the XF files you download with a Sitemap: https://www.site.com/sitemap.php text in it no?
Not really (read on).

How can XF not have control over that folder?
Example
Website root folder is /home/nginx/domains/domain.com/public, this folder is owned by user domain.com and has read/write/execute permissions for this user, read/execute permissions for group and other users.

nginx is running as user www-data

XenForo is installed in folder /home/nginx/domains/domain.com/public/forum which is owned by user domain.com-xenforo and also has read/write/execute permissions for the owner, read/execute for group and other users.

The PHP FPM pool also runs as user domain.com-xenforo

With this setup, XenForo has control over the files within it's root folder but it can't modify any files in the parent folder (it can read them though if they have read permission for other users).

So as XenForo does not have write access to the location where robots.txt "must be located" (it could be anywhere if rewrites are used) in this setup, it can't create / modify / maintain the file.

It would be possible to include a pre-built file in the ZIP (or display contents via ACP so the admin can put them in place), but at the end it would still be necessary for the admin to put it there / make it accessible so that IMHO wouldn't help much (but require some effort to build).

And that could be problematic if there already is a robots.txt and the admin accidently kills it be replacing with the content generated /suggested by XenForo-
 
Oh sorry overread that
Used
Remove Google form your Setup > Options > XML Sitemap Generation > Automatically submit sitemap to search engines list.
and removed the old invalid Google URL (Bing still offers this feature).
 
We've made a change so that sitemap pings to Google are silently skipped (same approach we took for Bing a while back).

I suspect in the future the sitemap ping option will be removed entirely as there isn't currently a default use case for it.

For now, just remove the URL yourself to suppress the error.
 
Back
Top Bottom