sitemap_generator
sitemap_generator copied to clipboard
Remove deprecated Google ping
See https://developers.google.com/search/blog/2023/06/sitemaps-lastmod-ping
Pinging with URL 'https://example.com/sitemap.xml.gz':
Ping failed for Google: #<OpenURI::HTTPError: 404 Sitemaps ping is deprecated. See https://developers.google.com/search/blog/2023/06/sitemaps-lastmod-ping.> (URL http://www.google.com/webmasters/tools/ping?sitemap=https%3A%2F%2Fexample.com%2Fsitemap.xml.gz)
ping @kjvarga
Until someone contributes a PR to remove the Google ping from the defaults, it can be deleted from the defaults this way:
SitemapGenerator::Sitemap.search_engines.delete(:google)
Alternatively, because the Google ping is currently the only default, you could also do SitemapGenerator::Sitemap.search_engines = {}
Can't you just use rake sitemap:refresh:no_ping
as per the documentation?
(obvs would be good to have it removed entirely)