Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including submit-sitemap with all npm packages installed. Try it out:

var submitSitemap = require("submit-sitemap")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

submit-sitemap v0.1.3

Submits/pings a sitemap file to Google and Bing to encourage them to recrawl your site.

submit-sitemap module for Node.js

Travis CI build status Version badge

Module to submit/ping a sitemap XML file to Google and Bing. This automates the manual process of submitting your sitemap via Google's webmaster tools and Bing's webmaster tools.

Use this after your site content has changed to encourage search engines to recrawl your site for Search Engine Optimisation (SEO) purposes. For example, this is useful to do after deploying a site update in Grunt and Gulp scripts.

If you're looking for modules to generate sitemaps, you may want to consider grunt-sitemap for Grunt and gulp-sitemap for Gulp.


To install:

npm install submit-sitemap --save-dev

To submit your sitemap:

var submitSitemap  = require('submit-sitemap').submitSitemap;
var yourSitemapUrl = "";


Use the callback parameter to respond to success and failure:

submitSitemap(yourSitemapUrl,  function(err) { console.error(err); });
  • On success, err will be undefined.

  • On error, err will be set to an error message. This happens if the sitemap URL could not be reached or any of the sitemap submission attempts failed.


To run the test suite:

npm test




Written by Sean Wilson (

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free