Xml sitemap – quick introduction

Submitting an xml sitemap to Google webmaster tools is recommended way to get site urls indexed by Google. This helps google to reach various urls easily. This also let you specify priorities to urls and update date.

Sitemap format

Sitemap is usually located at /sitemap.xml but it can be at a different location also. It can also be compressed and in that case usually located at /sitemxp.xml.gz. Here is sample sitemap content:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
It is usually better to submit compresed (gzipped) sitemap as it will save bandwidth and can be served faster. In case the sitemap is not big, it does not matter that much.

Multiple sitemaps

You can also create and submit muliple independent sitemaps. This may be useful for large sites. You can also create and submit sitemap index files. A sitemap index file contains pointers to other sitemaps. Here is a sample sitemap index file:

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.google.com/schemas/sitemap/0.84">
I think it is better to avoid sitemap index files if total number of urls is small (less than 10K or so).

WordPress and url priorities in sitemap

It may be a good idea to specify priorities in wordpress for various urls. But we should not keep too many priority values. I would suggest keeping priority 1 for posts and pages and keep it a lower value for tags and categories pages.

Submit sitemap in Google webmaster tools

These are the quick steps to submit a sitemap in Google webmaster tools:

  1. First login to webmaster tools and goto crawl -> sitemaps from left menu links:
  2. The click on add/test sitemap and enter the sitemap location as shown below:
  3. You can test the sitemap before adding it. That checks the xml file syntax and also generates a report containing number of urls in the sitemap as shown below:
  4. If the sitemap passes the test, then you can submit it and it will appear in sitemap list as shown below:

Reloading sitemap

Sitemap can be reloaded by two ways:

  1. It can be resubmitted thought Google webmaster tools. To do that click on the sitemap in the sitemap list and then on sitemap details page, click on resubmit as shown below:
  2. It can be resubmitted by hitting the following url


Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit


Click here to write/view comments