How do you generate and submit an XML sitemap?

Learn how to generate and submit a sitemap step by step. Speed up web indexing and help search engines crawl your content.
You’ve just launched your brand-new website, and you’re refreshing Google Search Console every hour, hoping to see your pages finally get indexed.
Here’s the thing: search engines aren’t mind readers. Without a clear map of your site, they might miss your best content—or take weeks to find it. That’s where a sitemap comes in, and the good news is, generating and submitting one takes less than 15 minutes.
What Is a Sitemap and Why Do You Need One?
Think of a sitemap as a treasure map for search engines like Google and Bing. It’s an XML file that lists all the important pages on your website, helping search engine crawlers discover and index your content faster and more efficiently .
Here’s why you should care:
- Speeds up indexing: Your pages can appear in search results much faster
- Saves crawl budget: Search engines won’t waste time wandering through dead ends
- Covers orphan pages: Even pages with no internal links pointing to them can be found
If your website has more than just a handful of pages, or if it’s brand new with no external links yet, a sitemap is essential for getting discovered.
Step 1: Generate Your Sitemap (Two Easy Methods)
You don’t need to be a developer to create a sitemap. Here are the most practical ways:
Method 1: Let Your CMS Handle It (Easiest)
If you’re using WordPress, Wix, Blogger, or most modern content management systems, it likely generates a sitemap automatically. For WordPress users, plugins like Yoast SEO do the heavy lifting—it creates a sitemap_index.xml file that updates automatically every time you publish new content .
Your sitemap will typically live at:
https://yoursite.com/sitemap.xml
or
https://yoursite.com/sitemap_index.xml
Check your live site by typing that URL into your browser. If you see structured XML code, you’re good to go!
Method 2: Use a Free Sitemap Generator Tool
For custom-built sites or those without a built-in generator, free tools work wonders:
- XML-Sitemaps.com: Great for small sites. Enter your URL, and it crawls up to 500 pages for free. Download the generated file and upload it to your site’s root folder .
- Screaming Frog SEO Spider: A desktop app that crawls your site and generates sitemaps. Free for up to 500 URLs .
Advanced option: If you’re comfortable with the command line, tools like @geosuite/sitemap-builder can crawl your site in seconds and output a clean, standards-compliant sitemap:
npx @geosuite/sitemap-builder https://yoursite.com --output sitemap.xml
This option lets you control crawl depth, max pages, and more .
Step 2: Check Your Sitemap Before Submitting
Before you submit, give your sitemap a quick health check to avoid common mistakes:
- Open it in your browser: Can you see the XML? Good. If it shows a 404 error, the file isn’t publicly accessible .
- Confirm the URL format: Every URL in your sitemap should be absolute—meaning
https://yoursite.com/page, not just/page. - Check the limit: A single sitemap can contain up to 50,000 URLs and cannot exceed 50MB in size (uncompressed). If you’re bigger than that, you need a sitemap index file .
- Exclude blocked pages: Never include pages marked
noindexor blocked by robots.txt—this sends conflicting signals to Google .
Step 3: Submit Your Sitemap to Google Search Console
Here’s the step-by-step process that actually gets your map into Google’s hands:
Step 1: Sign in to Google Search Console with your Google account .
Step 2: Select your website property from the left-hand dashboard.
Step 3: In the left navigation menu, click “Sitemaps” under the Indexing section .
Step 4: Enter the path to your sitemap. For example, if your site is https://example.com/sitemap.xml, you’d type just sitemap.xml in the field (the domain is already prefilled) .
Step 5: Click Submit.
If your sitemap is a sitemap index file (like sitemap_index.xml), submit that single file—Google will automatically find and process all the individual sitemaps listed inside it .
Step 4: Verify Submission & Monitor
After clicking Submit, Google will show a status message. A green “Success” means your sitemap was accepted and processing has begun .
Keep in mind: It can take some time—hours to days—for Google to crawl and index the pages listed in your sitemap. Be patient!
You can monitor progress right in Search Console under the Sitemaps section. It shows:
- How many URLs were discovered
- How many have been indexed
- Any errors that need fixing
Quick Comparison: Sitemap Generation Options
| Tool / Method | Best For | Cost | Auto-Updates? |
|---|---|---|---|
| Yoast SEO (WordPress) | WordPress sites | Free / Premium | Yes |
| Wix / Blogger | CMS users | Included | Yes |
| XML-Sitemaps.com | Non-WP / small sites | Free (500 pages) | No (manual) |
| Screaming Frog | SEO professionals | Free (500 URLs) / Paid | No (manual) |
| @geosuite/sitemap-builder | Developers / custom sites | Free (open source) | No (manual) |
Frequently Asked Questions
Do I even need a sitemap?
If your site has good internal linking and is small, search engines can usually find everything on their own. But for new sites, large sites, or content-heavy sites, a sitemap speeds up discovery significantly .
What’s the difference between sitemap.xml and sitemap_index.xml?sitemap.xml is a single file listing all your URLs. sitemap_index.xml is a file that lists multiple separate sitemaps—useful when you have more than 50,000 URLs or want to organize them by content type (e.g., posts vs. products) .
Should I include every page in my sitemap?
Only include pages you actually want indexed. That means excluding tag archives, paginated content, and admin pages. Including thin or duplicate content wastes Google’s crawl budget .
How often should I update my sitemap?
If your CMS doesn’t auto-update, resubmit your sitemap whenever you add or remove significant content. Google typically checks sitemaps every 24 hours, but you can speed this up by resubmitting in Search Console .
Does Google actually use the <priority> and <changefreq> tags?
No. Google ignores both of these values. They’re essentially relics from the early days of the sitemaps protocol. The only optional tag that holds weight is <lastmod>—if it’s consistently accurate .
What if I don’t see my sitemap working in Search Console?
Try deleting the old sitemap entry and re-submitting. Also check that your robots.txt file isn’t blocking access. The URL must be accessible directly in your browser .
References
- Google for Developers. Build and submit a sitemap. Retrieved from https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap
- Google Search Central Blog. Using Sitemap Index Files. Retrieved from https://developers.google.com/search/blog/2005/08/using-sitemap-index-files
- Search Engine Journal. How To Use XML Sitemaps To Boost SEO. Retrieved from https://www.searchenginejournal.com/technical-seo/xml-sitemaps/
- Bluehost. What Is an XML Sitemap and Why Should You Have One? Retrieved from https://www.bluehost.com/blog/what-is-an-xml-sitemap/
- Artlogic Support. How to submit your website to Google. Retrieved from https://support.artlogic.net/hc/en-gb/articles/360012129539
- Treez Help Center. How to Update Your Sitemap in Google Search Console. Retrieved from https://support.treez.io/en/articles/11834062
Ready to get your pages indexed? Head over to Google Search Console right now and submit that sitemap—it’s the fastest way to tell Google, “Hey, my content is here!” Drop a comment if you run into any roadblocks!