Creating Sitemaps:
Google can accept Web 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 Bing and Yahoo!, that are members of sitemaps.org.
Here’s an example of a basic Sitemap with a single entry for a URL that includes an image and a video (for convenience, only a subset of available video information is shown).
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.sitemaps.org/schemas/sitemap-image/1.1" xmlns:video="http://www.sitemaps.org/schemas/sitemap-video/1.1"> <url> <loc>http://www.example.com/foo.html</loc> <image:image> <image:loc>http://example.com/image.jpg</image:loc> </image:image> <video:video> <video:content_loc>http://www.example.com/video123.flv</video:content_loc> <video:player_loc allow_embed="yes" autoplay="ap=1">http://www.example.com/videoplayer.swf?video=123</video:player_loc> <video:thumbnail_loc>http://www.example.com/thumbs/123.jpg</video:thumbnail_loc> <video:title>Grilling steaks for summer</video:title> <video:description>Get perfectly done steaks every time</video:description> </video:video> </url> </urlset>
You can create your Sitemap manually. Alternatively, there are a number of third-party tools that can help you generate Sitemaps. In addition to the standard format above, Google also accepts the following as Sitemaps:
Here’s an example of a basic Sitemap with a single entry for a URL that includes an image and a video (for convenience, only a subset of available video information is shown).
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.sitemaps.org/schemas/sitemap-image/1.1" xmlns:video="http://www.sitemaps.org/schemas/sitemap-video/1.1"> <url> <loc>http://www.example.com/foo.html</loc> <image:image> <image:loc>http://example.com/image.jpg</image:loc> </image:image> <video:video> <video:content_loc>http://www.example.com/video123.flv</video:content_loc> <video:player_loc allow_embed="yes" autoplay="ap=1">http://www.example.com/videoplayer.swf?video=123</video:player_loc> <video:thumbnail_loc>http://www.example.com/thumbs/123.jpg</video:thumbnail_loc> <video:title>Grilling steaks for summer</video:title> <video:description>Get perfectly done steaks every time</video:description> </video:video> </url> </urlset>
You can create your Sitemap manually. Alternatively, there are a number of third-party tools that can help you generate Sitemaps. In addition to the standard format above, Google also accepts the following as Sitemaps:
- RSS, mRSS, and Atom 1.0: 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. In addition, you can use an mRSS (media RSS) feed to provide Google with details about video content on your site.
- Text file: For basic Web Sitemaps (Sitemaps that include only web page URLs, not image, video, or other specalized data), 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.
- The text file must use UTF-8 encoding.
- The text file should contain nothing but the list of URLs.
- You can name the text file anything you wish. Google recommends giving the file a .txt extension (for instance, sitemap.txt).
Guidelines for Sitemaps:
- A Sitemap file can contain no more than 50,000 URLs and must be no larger than 50MB 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.
- If you have more than one Sitemap, you can list them in a Sitemap index file and then submit the Sitemap index file to Google. You don't need to submit each Sitemap file individually.
- 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/.
- Do not include session IDs in URLs.
- Your Sitemap file must specify the following XML namespace: xmlns="http://www.sitemaps.org/schemas/sitemap/0.9".
- The Sitemap URL must be UTF8-encoded, and encoded for readability by the webserver on which it is located.
- If your site is accessible on both the www and non-www versions of your domain, you don’t need to submit a separate Sitemap for each version. However, we recommend picking either the www or the non-www version, and using recommended canonicalization methods to tell Google which version you are using.
- If you’re considering hiring a consultant to help you optimize your Sitemaps, we recommend reading our recommendations on working with Search Engine Optimizers (SEOs). In addition, you should be familiar with our Webmaster Guidelines and our SEO Starter Guide. It can also be useful to check with colleagues with similar sites or businesses.
- A Sitemap file is independent of the language of the content. To make sure that each language version can be crawled and indexed, use unique URLs. These URLs can all be included in your Sitemap files.