All Guides
SEO + Discoverability

Set Up XML Sitemaps

Help search engines find your pages. Takes 10 minutes.

What this covers: What XML sitemaps are, how to create one for WordPress or static sites, how to submit it to Google Search Console and Bing, and best practices for sitemap structure and maintenance.

Who it’s for: Site owners who want search engines to discover and index their pages faster, especially for new or large sites.

Key outcome: You’ll have an XML sitemap generated, submitted to Google and Bing, and referenced in your robots.txt — ensuring search engines can find every page you want indexed.

Time to read: 4 minutes

Part of: SEO & Discoverability series

What’s a Sitemap

Sitemaps tell search engines what pages exist and how important they are. A good sitemap speeds up indexing and helps Google discover new content faster.

An XML file listing all URLs you want indexed. Tells search engines: “Here are my pages. Please crawl them.”

Do You Need One?

Yes: Sites with 500+ pages, new sites, sites with poor internal linking

Maybe not: Small sites (under 100 pages) with good internal links

It never hurts to have one.

Create Your Sitemap

XML sitemaps help search engines discover and index your content more efficiently by providing a complete list of pages along with metadata about when they were last updated. For most sites, automated sitemap generation ensures new content gets indexed without manual intervention.

WordPress Sitemap

Built-in since WordPress 5.5. Find it at: yoursite.com/wp-sitemap.xml

For more control, use Yoast SEO or XML Sitemaps.

Static Sites

If you’re not on WordPress, you need to generate the sitemap yourself. These tools crawl your live site and output a valid XML file you can upload to your server:

  • XML-Sitemaps.com (free, up to 500 URLs)
  • Screaming Frog (crawls your site, exports sitemap)

Manual


<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
 <url>
 <loc>https://example.com/</loc>
 <lastmod>2024-01-15</lastmod>
 <priority>1.0</priority>
 </url>
 <url>
 <loc>https://example.com/about</loc>
 <lastmod>2024-01-10</lastmod>
 <priority>0.8</priority>
 </url>
</urlset>

Submit to Search Engines

Google Search Console

  1. Go to Sitemaps (left menu)
  2. Enter sitemap URL: sitemap.xml
  3. Click Submit

Bing Webmaster Tools

  1. Go to Sitemaps
  2. Click “Submit sitemap”
  3. Enter full URL

robots.txt

Include your sitemap location:


Sitemap: https://example.com/sitemap.xml

Sitemap Rules

The sitemap protocol has hard limits. Break any of these and search engines will ignore the file entirely.

  • Max 50,000 URLs per sitemap
  • Max 50MB file size (uncompressed)
  • For larger sites, use a sitemap index
  • Only include canonical URLs
  • Only include 200-status pages
  • Update lastmod when content changes

Sitemap Index (Large Sites)

A single sitemap file caps at 50,000 URLs and 50MB uncompressed. If your site is bigger — or if you just want better organization — you need a sitemap index. It’s a file that points to multiple smaller sitemaps, usually split by content type. Most WordPress SEO plugins create these automatically.


<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
 <sitemap>
 <loc>https://example.com/sitemap-posts.xml</loc>
 </sitemap>
 <sitemap>
 <loc>https://example.com/sitemap-pages.xml</loc>
 </sitemap>
</sitemapindex>

What NOT to Include

Your sitemap should only list pages you want Google to rank. Including low-value pages wastes crawl budget — the number of pages Google will crawl per visit. Every URL in your sitemap signals “this page matters.” Don’t dilute it.

  • Noindexed pages
  • Duplicate content
  • Paginated archives (usually)
  • Search result pages
  • Login/admin pages
  • 404 pages

Check It’s Working

A sitemap only helps if search engines can read it. After submitting, give it a week and check back. Google will tell you if anything is wrong.

  • Visit your sitemap URL directly
  • Check Search Console → Sitemaps for errors
  • Compare “Discovered” vs “Indexed” counts

Submit and Monitor in Search Console

Submit your sitemap to Search Console. Check back in a week to see how many URLs got indexed.

Sources

XML Sitemap Questions Answered

Does WordPress automatically create a sitemap?

Yes, since WordPress 5.5 (August 2020), a basic XML sitemap is generated at /wp-sitemap.xml. However, most SEO plugins like Yoast or Rank Math create more comprehensive sitemaps with better control over what gets included.

How do I submit my sitemap to Google?

Go to Google Search Console, select your property, click “Sitemaps” in the left menu, enter your sitemap URL (usually /sitemap_index.xml or /wp-sitemap.xml), and click Submit. Google will start crawling it within hours.

Should I include every page in my sitemap?

No. Exclude thin content, duplicate pages, admin pages, tag archives (if thin), and any pages set to noindex. Your sitemap should only contain pages you want Google to index and rank.

How often does Google crawl my sitemap?

Google recrawls sitemaps on its own schedule, typically every few days to weeks. Adding lastmod dates to your sitemap entries helps Google prioritize recently updated content. You cannot force a specific crawl frequency.

✓ The Sitemap Verification Checklist

  • Visiting yoursite.com/sitemap.xml shows a valid XML sitemap
  • Google Search Console shows “Sitemap submitted” with “Success” status
  • The sitemap includes your important pages (spot-check 5-10 URLs)

Verification: Go to Google Search Console > Sitemaps. Status should say “Success” and show pages discovered.