XML Sitemaps: Create, Submit and Maintain Properly
Master XML Sitemaps with this complete guide on creating, submitting, and maintaining sitemaps to improve crawling and indexing.
What an XML sitemap does
An XML sitemap is a file that lists all the important URLs on your website in a structured format, helping search engines discover and understand your site's content. It acts as a roadmap for Googlebot — instead of following every link on your site to discover pages, Googlebot can consult your sitemap and immediately know which pages exist, when they were last updated, and how important they are relative to each other.
Sitemaps are particularly valuable for: large sites where some pages might be difficult to reach through internal links alone; new sites where few external links exist to help Googlebot discover pages; and sites with frequently updated content where you want Google to know about new or changed pages as quickly as possible.
XML sitemaps also help search engines prioritize crawling more efficiently. When Googlebot visits a sitemap, it can quickly identify which pages were recently updated and should be revisited for fresh indexing. This is especially important for ecommerce stores, news websites, blogs, and service-based businesses that publish new content regularly. Without a sitemap, some valuable pages may remain undiscovered for extended periods, especially if they are buried deep within the site's structure or have very few internal links pointing to them.
Another major advantage of XML sitemaps is improved crawl budget management. Large websites often have thousands of URLs, and search engines allocate only a limited amount of crawling resources during each visit. A clean, optimized sitemap helps direct those resources toward high-value pages instead of wasting them on duplicate, low-quality, or irrelevant URLs. This improves indexing efficiency and increases the likelihood that your most important pages appear in search results faster.
Additionally, XML sitemaps provide useful diagnostic insights inside Google Search Console. Website owners can monitor how many URLs were discovered, indexed, or excluded, making it easier to identify technical SEO problems before they negatively impact rankings and organic traffic..
A sitemap does not guarantee indexing — it is a suggestion to Google, not a command. Submitting a URL in your sitemap tells Google the page exists. Whether Google indexes it depends on content quality, crawl budget, and site authority. But without a sitemap, important pages may take weeks longer to be discovered.
How to create an XML sitemap
For most websites, you do not need to manually write a sitemap. Tools and plugins generate them automatically:
- WordPress:Yoast SEO, Rank Math, and All in One SEO all generate XML sitemaps automatically and update them whenever you publish or modify content. The sitemap URL is typically yoursite.com/sitemap.xml or yoursite.com/sitemap_index.xml. No configuration needed beyond installing the plugin.
- Shopify:Shopify generates a sitemap automatically at yourstore.com/sitemap.xml. It includes products, collections, pages, and blog posts. No setup required.
- Custom or static sites:Use a sitemap generator like xml-sitemaps.com (free, crawl-based), Screaming Frog (free up to 500 URLs), or build the sitemap programmatically using your site framework's sitemap module.
- Next.js, Gatsby, or other JS frameworks:Use the framework's sitemap plugin (next-sitemap for Next.js, gatsby-plugin-sitemap for Gatsby) to auto-generate sitemaps on build.
What should — and should not — be in your sitemap
A common mistake is including every URL the CMS generates — including tag pages, author archives, date archives, and parameter URLs — in the sitemap. This floods Google with low-value URLs and dilutes attention from your important content pages. Review your sitemap periodically and prune URLs that should not be indexed.
Submitting y
our sitemap to Google Search Console
Sitemap maintenance — what to check monthly
- Status remains "Success"— Any change to "Has errors" needs immediate investigation
- URLs discovered vs indexed ratio— If 500 URLs are discovered but only 50 are indexed, significant content quality or crawl budget issues exist
- No 404s in sitemap— If pages you deleted are still in the sitemap, update the sitemap to remove them or ensure they redirect properly
- New important pages are included— After publishing significant new content, verify it appears in the sitemap within 24 hours
After publishing important new content, go to Search Console → URL Inspection, enter the new page URL, and click "Request Indexing". This signals Googlebot to crawl the page immediately rather than waiting for its scheduled crawl of the sitemap — typically getting new pages indexed within hours instead of days.