Sign in

Webmasters/Site owners Help



Creating and submitting Sitemaps

Print

About Sitemaps

Sitemaps are a way to tell Google about pages on your site we might not otherwise discover. In its simplest terms, a XML Sitemap—usually called Sitemap, with a capital S—is a list of the pages on your website. Creating and submitting a Sitemap helps make sure that Google knows about all the pages on your site, including URLs that may not be discoverable by Google's normal crawling process.

In addition to regular Sitemaps, you can also create Sitemaps designed to give Google information about specialized web content, including video, mobile, News, Code Search, and geographical (KML) information.

When you update your site by adding or removing pages, tell Google about it by resubmitting your Sitemap. Google doesn't recommend creating a new Sitemap for every change.

What do you want to do?

Learn more about Sitemaps

Sitemaps are particularly helpful if:

  • Your site has dynamic content.
  • Your site has pages that aren't easily discovered by Googlebot during the crawl process—for example, pages featuring rich AJAX or images.
  • Your site is new and has few links to it. (Googlebot crawls the web by following links from one page to another, so if your site isn't well linked, it may be hard for us to discover it.)
  • Your site has a large archive of content pages that are not well linked to each other, or are not linked at all.

Google doesn't guarantee that we'll crawl or index all of your URLs. For example, we won't crawl or index image URLs contained in your Sitemap. However, we use the data in your Sitemap to learn about your site's structure, which will allow us to improve our crawler schedule and do a better job crawling your site in the future. In most cases, webmasters will benefit from Sitemap submission, and in no case will you be penalized for it.

You can also use a Sitemap to provide additional information about your site, such as the date it was last updated, and how often you expect the page to change. More information.

Google adheres to Sitemap Protocol 0.9 as defined by sitemaps.org. Sitemaps created for Google using Sitemap Protocol 0.9 are therefore compatible with other search engines that adopt the standards of sitemaps.org.

Create a Sitemap

General guidelines for URLs in Sitemaps

  • A Sitemap can contain a list of URLs or a list of Sitemaps.
  • If your Sitemap contains a list of other Sitemaps, you should save it as a Sitemap index file and use the XML format provided for that file type. A Sitemap index file cannot list more than 50,000 Sitemaps.
  • A Sitemap file can contain no more than 50,000 URLs and be no larger than 10MB when uncompressed. If your Sitemap is larger than this, break it into several smaller Sitemaps. These limits help ensure that your web server is not overloaded by serving large files to Google.
  • Specify all URLs using the same syntax. For instance, if you specify your site location as http://www.example.com/, your URL list should not contain URLs that begin with http://example.com/. And if you specify your site location as http://example.com/, your URL list should not contain URLs that begin with http://www.example.com/.
  • Do not include session IDs in URLs.
  • Do not include direct image URLs in Sitemaps. Google does not index the image directly; instead, we index the page on which the image appears. Direct image URLs included in Sitemaps won't be indexed.
  • The Sitemap URL must be encoded for readability by the webserver on which it is located. In addition, it can contain only ASCII characters. It can't contain upper ASCII characters or certain control codes or special characters such as * and {}. If your Sitemap URL contains these characters, you'll receive an error when you try to add it.

Creating a Sitemap based on the Sitemap protocol

Google can accept Sitemaps in a number of formats, but we recommend creating a Sitemap based on the Sitemap protocol because the same file can be submitted to the other search engines, such as MSN and Yahoo!, that are members of sitemaps.org.

You can create a Sitemap in a number of different ways:

  • Manually create a Sitemap based on the Sitemap protocol
  • Use the Sitemap Generator. If you have access to your webserver and it has Python installed, you can use our script to create a Sitemap that uses the Sitemap protocol. The Google Sitemap Generator is a Python script that creates a Sitemap for your site using the Sitemap Protocol. This script can create Sitemaps from URL lists, web server directories, or from access logs.
  • Use a third-party tool. A number of third parties offer tools you can use to create a valid Sitemap.

Using an RSS / Atom feed as a Sitemap

Google accepts RSS (Real Simple Syndication) 2.0 and Atom 1.0 feeds. If you have a blog with an RSS or Atom feed, you submit the feed's URL as a Sitemap. Most blog software creates your feed for you. Note that the feed may only provide information on recent URLs.

Creating a Sitemap based on a text file

You can provide Google with a simple text file that contains one URL per line. For example:

http://www.example.com/file1.html
http://www.example.com/file2.html

For best results, follow these guidelines:

  • You must fully specify URLs as Google attempts to crawl them exactly as provided.
  • Each text file can contain a maximum of 50,000 URLs. If your site includes more than 50,000 URLs, you can separate the list into multiple text files and add each one separately.
  • The text file must use UTF-8 encoding. You can specify this when you save the file (for instance, in Notepad, this is listed in the Encoding menu of the Save As dialog box).
  • The text file should contain no information other than the list of URLs.
  • The text file should contain no header or footer information.
  • You can name the text file anything you wish. Google recommends giving the file a .txt extension to identify it as a text file (for instance, sitemap.txt).

You should upload the text file to your server. Once you've created this file, you can submit it as a Sitemap. This process, while manual, is the simplest and is probably best if you're not familiar with scripting or managing your web server.

Manage Sitemaps for multiple sites

If you have multiple websites, you can simplify the process of creating and submitting Sitemaps by creating one or more Sitemaps that includes URLs for all your verified sites, and saving the Sitemap(s) to a single location. All sites must be verified in Webmaster Tools. More information.

Submit a Sitemap or update an already submitted Sitemap

Once you've created a Sitemap in an accepted format, you can submit it to Google using Google Webmaster Tools. This enables Google to provide you with useful status and statistical information.

Submitting Sitemaps using Google Webmaster Tools

Before you begin, make sure you have the following sites added and verified in your Webmaster Tools account:

  • the site on which the Sitemap is located
  • the site(s) whose URLs are referenced in the Sitemap
  1. Upload your Sitemap to your site.
  2. On the Webmaster Tools home page, click the site you want.
  3. Under Site configuration, click Sitemaps.
  4. In the text box, complete the path to your Sitemap (for example, if your Sitemap is at http://www.example.com/sitemap.xml, type sitemap.xml).
  5. Click Submit Sitemap.

Submitting Sitemaps using your robots.txt file

You can tell Google and other search engines about your Sitemap by adding the following line to your robots.txt file (updating the sample URL with the complete path to your own Sitemap):

Sitemap: http://example.com/sitemap_location.xml

This directive is independent of the user-agent line, so it does not matter where you place it in your file. If you have a Sitemap index file, you can include the location of just that file. You do not need to list each individual Sitemap listed in the index file.

Resubmitting Sitemaps

When you make changes to your Sitemap, you can resubmit it using your Google Webmaster Tools account or an HTTP request.

Resubmitting a Sitemap using Webmaster Tools

  1. On the Webmaster Tools Home page, click the site you want.
  2. Under Site configuration, click Sitemaps.
  3. Select the Sitemap you want to resubmit, and then click Resubmit.

Resubmitting a Sitemap by sending Google an HTTP request

If you do this, you don't need to resubmit it using Webmaster Tools. The Submitted column will continue to show the last time you manually clicked the link, but the Last Downloaded column will be updated to show the last time our system fetched your Sitemap.

To resubmit your Sitemap using an HTTP request:

  1. Issue your request to the following URL:
    www.google.com/webmasters/tools/ping?sitemap=sitemap_url

    For example, if your Sitemap is located at http://www.example.com/sitemap.gz, your URL will become:

    www.google.com/webmasters/tools/ping?sitemap=http://www.example.com/sitemap.gz
  2. URL encode everything after the /ping?sitemap=:

    www.google.com/webmasters/tools/ping?sitemap=http%3A%2F%2Fwww.yoursite.com%2Fsitemap.gz
  3. Issue the HTTP request using wget, curl, or another mechanism of your choosing.

A successful request will return an HTTP 200 response code; if you receive a different response, you should resubmit your request. The HTTP 200 response code only indicates that Google has received your Sitemap, not that the Sitemap itself or the URLs contained in it were valid. To obtain status information about your Sitemap, resubmit it using Webmaster Tools account. We recommend that you resubmit a Sitemap no more than once per hour. An easy way to do this is to set up an automated job to generate and submit Sitemaps on a regular basis.

Note: If you are providing a Sitemap index file, you only need to issue a single HTTP request that includes the location of the Sitemap index file; you don't need to issue individual requests for each Sitemap listed in the index.

Fix a problem with Sitemaps

Problems submitting Sitemaps

If you're having problems submitting a Sitemap, make sure that the URLs in your Sitemap include the URL of your site exactly as it appears in your Webmaster Tools account. For example, if you have added the site http://www.example.com to Webmaster Tools, don't list URLs in this format: http://example.com/home.html. Instead, use http:///www.example.com/home.html.

Sitemap errors

The Sitemap Details page lists any errors Google found with your Sitemap, as well as warnings about potentially problematic issues. See details about the most common Sitemap errors.

Once you've reviewed your Sitemap and made any changes, save it and then resubmit it. It can take up to a day for Google to process the resubmitted Sitemap, so the warning status may continue to display until then.

Once you've reviewed your Sitemap and made any changes, save it and then resubmit it. It can take up to a day for Google to process the resubmitted Sitemap, so the warning status may continue to display until then.

updated 9/15/2009

Was this information helpful?

Help resources