What is an XML sitemap?
An XML sitemap is a file that lists the pages on your site you want search engines to find. It sits at an address such as example.com/sitemap.xml and helps Google and Bing discover new and updated pages faster, especially pages that few other pages link to.
Do you need a sitemap?
Search engines can find most pages on a small, well-linked site without one. A sitemap helps most when your site is large, when it is new and has few links from other sites, when pages are hard to reach through your menus, or when you publish often and want new pages found quickly. It never hurts to have one.
What to include, and what to leave out
- Include pages that load with a 200 status and that you want to appear in search results.
- Leave out pages marked noindex, URLs that redirect, error pages, duplicate URLs that point to a different canonical, and pages blocked in robots.txt.
Listing a page in your sitemap does not guarantee it will be indexed. It tells search engines the page exists and that you consider it important.
Priority and change frequency
Google ignores the priority and changefreq values in sitemaps, so this generator leaves them out. It does use lastmod when the date is accurate, which is why the generator only adds dates your server actually reports.
Sitemap limits
One sitemap file can hold up to 50,000 URLs and 50 MB uncompressed. Larger sites split their URLs across several sitemaps and list them in a sitemap index file.
How to submit your sitemap
- Upload sitemap.xml to the root folder of your site, so it opens at yourdomain.com/sitemap.xml.
- Add a line to your robots.txt file:
Sitemap: https://yourdomain.com/sitemap.xml - Submit it in Google Search Console (Sitemaps report) and in Bing Webmaster Tools.
WordPress sites with an SEO plugin and platforms such as Shopify create a sitemap automatically. Use this generator for static and custom-built sites, or to check what a crawler can really reach on yours.