XML Sitemap Generator
Add URLs below, set priority and changefreq, then generate your sitemap.xml ready for Google Search Console.
The Complete XML Sitemap Checklist: Everything You Need Before You Submit
An XML sitemap is one of the most misunderstood assets in technical SEO. Most site owners either skip it entirely, generate it once and forget it, or stuff it with every URL the site has ever produced β including 404 pages, pagination duplicates, and filtered e-commerce URLs that Google was never meant to crawl. Getting your sitemap right is not glamorous work, but it has a direct and measurable impact on how fast new content gets discovered and indexed. Here is a practical checklist to follow every time you build or update a sitemap.
1. Confirm Your Sitemap Follows the Sitemaps Protocol Schema
The sitemap standard is defined at sitemaps.org and the XML namespace declaration must appear exactly as specified: xmlns="http://www.sitemaps.org/schemas/sitemap/0.9". Every entry lives inside a <url> tag, and the only truly required element inside it is <loc>. The optional elements β <lastmod>, <changefreq>, and <priority> β are hints, not directives. Google has openly stated it may ignore changefreq and priority when crawling, but they still help indicate relative importance and are worth including for Bing and other search engines that weight them differently.
2. Only Include Canonical, Indexable URLs
This is the single most impactful rule and the one most frequently broken. Your sitemap should only list URLs that return a 200 HTTP status, carry no noindex directive in their <head>, and point to themselves as their canonical URL. Check each of these conditions before adding a URL:
- Does the URL return HTTP 200? (Not 301, 302, 404, or 410)
- Is there a
<meta name="robots" content="noindex">tag on the page? If yes, exclude it. - Does the page have a
<link rel="canonical">tag pointing to a different URL? If so, include the canonical target, not this URL. - Is the URL behind a login wall or accessible only with authentication? Exclude it β crawlers cannot access it.
Including non-canonical or non-indexable URLs in your sitemap does not help those pages; it simply confuses Google about your site's structure and wastes crawl budget.
3. Set Priority Values Strategically, Not Uniformly
Priority values range from 0.1 to 1.0. The mistake most generators make is assigning 1.0 to every single URL. When everything is the highest priority, nothing is. Use a tiered approach:
- 1.0 β Homepage only
- 0.8β0.9 β Core product or service pages, main category pages
- 0.6β0.7 β Blog posts, individual product pages, secondary landing pages
- 0.4β0.5 β Tag pages, author archives, older content
- 0.1β0.3 β Utility pages like privacy policy, terms of service, legal disclosures
This stratification helps search engines understand which pages deliver your core value proposition versus supporting content.
4. Use Real Dates in lastmod β Or Omit the Field Entirely
Google has been explicit about this: if you manipulate <lastmod> by setting it to today's date on every URL regardless of whether the content actually changed, you lose credibility for that signal entirely. Google learns to distrust your lastmod values and may stop using them to prioritize recrawls. The correct approach is to populate <lastmod> only when you know the actual date a page was last substantively modified β typically pulled from your CMS's updated-at timestamp. If you do not have reliable modification dates, omit the field. An absent <lastmod> is better than a dishonest one.
5. Respect the 50,000 URL and 50MB Limits
A single sitemap file cannot contain more than 50,000 URLs and must not exceed 50MB when uncompressed. If your site has more URLs than this, you need a sitemap index file β an XML file that references multiple individual sitemap files. The sitemap index uses a different schema with <sitemapindex> as the root element and <sitemap> entries pointing to each child file. Large e-commerce stores, news sites, and content platforms almost always need this structure.
6. Encode Special Characters Correctly
XML has five reserved characters that must be escaped if they appear in a URL: ampersand (& becomes &), less-than (< becomes <), greater-than (> becomes >), double quote (" becomes "), and apostrophe (' becomes '). URLs with query parameters are common culprits β a URL like ?color=red&size=L will break your sitemap XML if the ampersand is not escaped. Additionally, any non-ASCII characters in a URL should be percent-encoded per RFC 3986.
7. Verify the XML Is Well-Formed Before Submitting
A single malformed entry can cause the entire sitemap to be rejected or partially parsed. Before submitting to Google Search Console or Bing Webmaster Tools, validate your sitemap by pasting the XML into an XML validator or checking Google Search Console's coverage report after submission. Common validation errors include: unclosed tags, invalid characters, incorrect namespace declarations, and missing required elements.
8. Submit Through Google Search Console and Bing Webmaster Tools
Generating the file is only half the task. To actively trigger indexing, submit your sitemap URL through:
- Google Search Console β Sitemaps section under Index
- Bing Webmaster Tools β Sitemaps section in the left navigation
- Your robots.txt file β Add
Sitemap: https://yourdomain.com/sitemap.xmlat the bottom so any crawler can discover it automatically
You can also ping Google directly by fetching https://www.google.com/ping?sitemap=https://yourdomain.com/sitemap.xml, though this is less reliable than Search Console submission for ongoing monitoring.
9. Keep Your Sitemap Current with an Update Schedule
A sitemap that was accurate six months ago may now include deleted pages and miss dozens of new ones. Establish a maintenance cadence based on your publishing frequency:
- Daily publishers β Automate sitemap regeneration via CMS plugin or build pipeline on every publish event
- Weekly publishers β Regenerate and resubmit weekly
- Static/brochure sites β Regenerate every time a page is added, removed, or significantly updated
If you use WordPress, plugins like Yoast SEO or Rank Math handle this automatically. For custom or headless setups, build sitemap generation into your deployment pipeline so it never goes stale.
10. Cross-Check Your Sitemap Against Google's Index Coverage
After submitting, check Google Search Console's Index Coverage report over the following weeks. Look for URLs appearing in your sitemap that are flagged as "Excluded" β particularly those marked "Submitted URL not found (404)", "Submitted URL has crawl issue", or "Submitted URL blocked by robots.txt". These are actionable signals telling you exactly which URLs in your sitemap are problematic. Treat this report as a recurring audit task rather than a one-time check.
A clean, well-structured XML sitemap is not a guarantee of indexing β nothing is β but it removes friction from Google's discovery process and ensures the search engine is working from an accurate map of your site's canonical, indexable content. The time invested in getting it right compounds with every new page you publish.