A good[ish] website

Web development blog, loads of UI and JavaScript topics

Ping your sitemaps to Google and Bing to inform search engines about new content

Filed under: Webdev— Tagged with: seo

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, in that case you would send a GET request to a URL looking something like this:

  • Google:
  • Bing:

How to ping?

Of course this up to your project, but here’s some ideas.


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 = `${sitemap}`
  const bing = `${sitemap}`



Fetch is pretty much the same:



You could have something like this:


set -o errexit
set -o pipefail
set -o nounset

curl -S -s -o /dev/null ""$1
curl -S -s -o /dev/null ""$1
echo "Sitemaps pinged"

This -S -s -o /dev/null makes curl silent, but prints errors.




Just go the URLs 🤷‍♂️

Or use Google Search Console to submit the sitemaps:

Screenshot of Google Search Console

Or Bing Webmaster Tools:

Screenshot of Bing Webmaster Tools

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.

Comments would go here, but the commenting system isn’t ready yet, sorry.

  • © 2022 Antti Hiljá
  • About
  • All rights reserved yadda yadda.
  • I can put just about anything here, no one reads the footer anyways.
  • I love u!