How to separate Sitemaps for each language and avoid the deprecated method "ping"?

Created on 16 January 2024, 10 months ago
Updated 28 February 2024, 9 months ago

Problem/Motivation

We got the following error message in drupal watchdog:

GuzzleHttp\Exception\ClientException: Client error: `GET https://www.google.com/ping?sitemap=https://www.example.com/fr/sitemap.xml` resulted in a `404 Sitemaps ping is deprecated. See https://developers.google.com/search/blog/2023/06/sitemaps-lastmod-ping.` response: Sitemaps ping is deprecated. See https://developers.google.com/search/blog/2023/06/sitemaps-lastmod (truncated...) in GuzzleHttp\Exception\RequestException::create() (line 113 of /example/drupal/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php).

in our sitemap the new proposed method "lastmod" is already active, but in the settings of the sitemap module still is the "ping" method used. All hreflang pages are bundled in one sitemap. For SEO reasons it would be better to use a separate sitemap for each language. In our case: german, english, french.

How can we do that? What do we need to change in the settings of the module?

Thank you very much for any advice.

System:
Simple XML Sitemap 4.1.8
Drupal 10.2.1
PHP 8.1.25
MySQL 8.0.33
Server Apache

πŸ’¬ Support request
Status

Fixed

Version

4.1

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany pyretta

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @pyretta
  • πŸ‡©πŸ‡ͺGermany gbyte Berlin

    All hreflang pages are bundled in one sitemap. For SEO reasons it would be better to use a separate sitemap for each language. In our case: german, english, french.

    If you split the sitempas into languages, you don't have hreflang sitemaps anymore. The whole point of this standard (developed by Google) is to combine all language variants of links into one.

    but in the settings of the sitemap module still is the "ping" method used

    If you are using the simple_sitemap_engines submodule to submit the sitemaps to search engines, got to /admin/config/search/simplesitemap/engines/settings and disable submission. Use IndexNow submission instead which this module suppports well.

    Let me know if that helps.

  • Status changed to Fixed 9 months ago
  • πŸ‡©πŸ‡ͺGermany gbyte Berlin
  • πŸ‡²πŸ‡½Mexico djkozz Puebla

    Thank you, same issue here. Finally, Google does not care about sitemap.xml! They track everything, and also report as error the new Drupal robots.txt exclusions! Shame on them!

  • πŸ‡ΊπŸ‡ΈUnited States w01f

    Just following up here for clarification as we're also seeing some confusing reports for several sites in Google Analytics recently and are trying to track the cause down.

    Uploading screenshot of what I'm understanding are the recommended settings to, again as I understand we should have to:

    • avoid the deprecated 'ping' method
    • continue to display the hreflang sitemap for the language variant standard recommended by Google
  • πŸ‡©πŸ‡ͺGermany gbyte Berlin

    Finally, Google does not care about sitemap.xml! They track everything, and also report as error the new Drupal robots.txt exclusions! Shame on them!

    They do care about the sitemap same as before. They just think they know when you update it without you having to ping them about it.

    Uploading screenshot of what I'm understanding are the recommended settings to, again as I understand we should have to

    You got it and your settings are fine.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024