You can tell Google or Bing about the changes that have happened in your site, by pinging them your changed sitemaps.
"Pinging" in this case means sending a GET request to a provided endpoint. So nothing magical there.
Where to ping?
Let’s say your site’s domain is the classic example.com, in that case you would send a GET request to a URL looking something like this:
- Google:
https://www.google.com/webmasters/sitemaps/ping?sitemap=https://example.com/sitemap.xml - Bing:
https://www.bing.com/ping?sitemap=https://example.com/sitemap.xml
How to ping?
Of course this up to your project, but here’s some ideas.
Axios
Here’s an example how to do the GET request using the popular Axios http client. Note that we don’t need to wait for the requests, since we don’t care about the response:
const pingSearchEngines = sitemap => {
const google = `https://www.google.com/webmasters/sitemaps/ping?sitemap=https://example.com/${sitemap}`
const bing = `https://www.bing.com/ping?sitemap=https://example.com/${sitemap}`
axios.get(google).catch(console.log)
axios.get(bing).catch(console.log)
}Fetch
Fetch is pretty much the same:
fetch(url).catch(console.error)Bash
You could have something like this:
#!/bin/bash
set -o errexit
set -o pipefail
set -o nounset
curl -S -s -o /dev/null "https://www.google.com/webmasters/sitemaps/ping?sitemap="$1
curl -S -s -o /dev/null "https://www.bing.com/ping?sitemap="$1
echo "Sitemaps pinged"This -S -s -o /dev/null makes curl silent, but prints errors.
Usage:
$ ping.sh https://clubmate.fi/sitemap.xmlManually
Just go the URLs 🤷♂️
- https://www.google.com/webmasters/sitemaps/ping?sitemap=https://clubmate.fi/sitemap.xml
- https://www.bing.com/ping?sitemap=https://clubmate.fi/sitemap.xml.
Or use Google Search Console to submit the sitemaps:


How often to ping?
Google doesn’t define a limit. For example on a site I’m working, we have a 30 minute cache for the sitemaps, so we ping every 30 minutes. The request is inside the code that created the sitemaps, so it runs when the cache expires, either on its own or when a deployment happens.