On this page of Google help:
https://www.google.com/webmasters/tools/docs/en/sitemap-generator.html#submitting
Google mentions that there is a way to notify them of an updated sitemap using an HTTP request.
When you click the link, it takes you to this page:
http://www.google.com/support/webmasters/bin/answer.py?answer=34592&topic=8482&hl=en#ping
But there is no information on where to ping with what request.
Does anyone know what this address is and what parameters are required?
To this use this method of inspection, simply type /sitemap. xml at the end of the domain's URL. For example, if your domain is google.com, you'd navigate to google.com/sitemap.xml to view the sitemap for that domain and see which pages have been indexed.
How to (automatically) update sitemaps. If you have a small website where content changes happen either on a weekly- or monthly-basis, you can simply create an XML- and HTML-sitemap by hand, any time new content is available and upload it to your webspace.
http://www.google.com/webmasters/sitemaps/ping?sitemap=URL-encoded URL to your sitemap
Simplest solution: file_get_contents("https://www.google.com/webmasters/tools/ping?sitemap={$sitemap}");
That will work on every major hosting provider. If you want optional error reporting, here's a start:
$data = file_get_contents("https://www.google.com/webmasters/tools/ping?sitemap={$sitemap}");
$status = ( strpos($data,"Sitemap Notification Received") !== false ) ? "OK" : "ERROR";
echo "Submitting Google Sitemap: {$status}\n";
As for how often you should do it, as long as your site can handle the extra traffic from Google's bots without slowing down, you should do this every time a change has been made.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With