This page describes how to build a sitemap and make it available to Google. Learn more about sitemaps here. Show
Sitemap formatsGoogle supports several sitemap formats: Google accepts the standard sitemap protocol in all formats. Google does not currently consume the All formats limit a single sitemap to 50MB (uncompressed) or 50,000 URLs. If you have a larger file or more URLs, you will have to break your list into multiple sitemaps. You can optionally create a sitemap index file (a file that points to a list of sitemaps) and submit that single index file to Google. You can submit multiple sitemaps and/or sitemap index files to Google. XMLHere is a very basic XML sitemap that includes the location of a single URL: <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>https://www.example.com/foo.html</loc> <lastmod>2022-06-04</lastmod> </url> </urlset> You can find more complex examples and full documentation at sitemaps.org. You can see examples of and sitemaps for . RSS, mRSS, and Atom 1.0If you have a blog with an RSS or Atom feed, you can submit the feed's URL as a sitemap. Most blog software is able to create a feed for you, but recognize that this feed only provides information on recent URLs.
TextIf your sitemap includes only web page URLs, you can provide Google with a simple text file that contains one URL per line. For example: https://www.example.com/file1.html https://www.example.com/file2.html Guidelines for text file sitemaps
Sitemap extensions for additional media typesGoogle supports extended sitemap syntax for the following media types. Use these extensions to describe video files, images, and other hard-to-parse content on your site to improve indexing.
General sitemap guidelines
How to create a sitemapWhen creating a sitemap, you're telling search engines about which URLs you prefer to show in search results. These are the canonical URLs. If you have the same content accessible under different URLs, choose the URL you prefer and include that in the sitemap instead of all URLs that lead to the same content. Once you've decided which URLs to include in the sitemap, pick one of the following ways to create a sitemap, depending on your site architecture and size:
Let your CMS generate a sitemap for youIf you're using a CMS such as WordPress, Wix, or Blogger, it's likely that your CMS has already made a sitemap available to search engines. Try searching for information about how your CMS generates sitemaps, or how to create a sitemap if your CMS doesn't generate a sitemap automatically. For example, in case of Wix, search for "wix sitemap". For all other site setups, you will need to generate the sitemap yourself. Manually create a sitemapFor sitemaps with less than a few dozen URLs, you may be able to manually create a sitemap. For this, open a text editor such as Windows Notepad or Nano (Linux, MacOS), and follow a syntax described in the section. You can name the file anything you like as long as the characters are allowed in a URL. You can manually create larger sitemaps, but it's a tedious process and hard to maintain long term. Automatically generate a sitemap with toolsFor sitemaps with more than a few dozen URLs, you will need to generate the sitemap. There are various tools that can generate a sitemap. However, the best way is to have your website software generate it for you. For example, you can extract your site's URLs from your website's database and then export the URLs to either the screen or actual file on your web server. Talk to your developers or server manager about this solution. If you need inspiration for the code, check out our old collection of third-party sitemap generators. Keep in mind the . Learn more about managing large sitemaps. Submit your sitemap to GoogleGoogle doesn't check a sitemap every time a site is crawled; a sitemap is checked only the first time that we notice it, and thereafter only when you ping us to let us know that it's changed. Alert Google about a sitemap only when it's new or updated; don't submit or ping unchanged sitemaps multiple times. If you have updated pages in the sitemap, mark them with the field. Other XML files have a similar field, such as https://www.example.com/%FCmlat.html&q=name3 for Atom XML. You can also learn how to . There are a few different ways to make your sitemap available to Google:
Submitting a sitemap is merely a hint: it doesn't guarantee that Google will download the sitemap or use the sitemap for crawling URLs on the site. |