kjvarga / sitemap_generator

SitemapGenerator is a framework-agnostic XML Sitemap generator written in Ruby with automatic Rails integration. It supports Video, News, Image, Mobile, PageMap and Alternate Links sitemap extensions and includes Rake tasks for managing your sitemaps, as well as many other great features.
MIT License
2.43k stars 277 forks source link

Remove deprecated Google ping #432

Open jcoyne opened 1 month ago

jcoyne commented 1 month ago

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)
n-rodriguez commented 1 month ago

ping @kjvarga

dan-jensen commented 3 weeks ago

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 = {}