Skip to content
QualityWordPress

XML Sitemaps in WordPress: A Simple Guide

Learn what XML sitemaps are, how WordPress generates them, how to submit yours to Google Search Console, and how to fix common sitemap issues.

QualityWordPress 6 min read
Developer reviewing a website structure diagram on a large monitor

An XML sitemap is one of those behind-the-scenes details that looks technical but is straightforward to set up correctly. It tells search engines which pages exist on your site, when they were last updated, and how they relate to each other — not as a ranking factor in itself, but as a map that helps crawlers work more efficiently. For larger sites or newer sites with fewer inbound links, a well-structured sitemap can make the difference between pages getting indexed promptly or languishing in the crawl queue for weeks.

This guide explains what WordPress sitemaps look like, how to generate and customize them, how to submit them to Google Search Console, and what to do when things go wrong.

What an XML Sitemap Actually Is

An XML sitemap is a file (or set of files) that lists URLs on your website in a structured format. It is not an HTML sitemap meant for human navigation — it is a machine-readable file intended for crawlers.

A minimal entry in an XML sitemap looks like this:

<url>
  <loc>https://example.com/blog/my-post/</loc>
  <lastmod>2026-03-15</lastmod>
</url>

The <loc> element is required. The <lastmod> date is optional but useful — it signals to Google when the content was last updated, which can trigger a recrawl for pages that have been improved.

Google’s own documentation at developers.google.com/search explains the full specification and what it supports. The short version: modern sitemaps use the sitemap protocol defined at sitemaps.org, and Google supports most of it.

WordPress Core Sitemaps

Since WordPress 5.5, the platform ships with a built-in XML sitemap generator. No plugin needed. If you have a default WordPress install with no SEO plugin active, your sitemap is probably already live at:

yourdomain.com/wp-sitemap.xml

Visit that URL to confirm. You will see a sitemap index file that links to individual sitemaps for posts, pages, categories, tags, users, and custom post types — each broken into a separate file.

The core sitemap is functional and requires zero configuration. Its limitations are that it does not let you:

  • Exclude specific posts or pages
  • Set priority or change frequency values
  • Integrate with Search Console automatically
  • Control which post types or taxonomies appear

For most sites, those limitations matter enough to use an SEO plugin instead.

SEO Plugin Sitemaps

Both Yoast SEO and Rank Math generate their own XML sitemaps and disable the WordPress core sitemap automatically when active. Their sitemaps offer meaningful advantages:

  • Selective inclusion — exclude noindexed pages, tag archives, author pages, or any URL you do not want crawled
  • Image sitemap support — list images within pages so Google Image Search can discover them
  • News sitemaps — for publishers eligible for Google News
  • Automatic Search Console ping — notify Google when new content is published

Finding Your Sitemap URL with Yoast SEO

With Yoast active, go to SEO → Features and confirm the XML sitemaps toggle is on. Your sitemap index will be at:

yourdomain.com/sitemap_index.xml

Finding Your Sitemap URL with Rank Math

With Rank Math active, go to Rank Math → Sitemap Settings. Your sitemap index will be at:

yourdomain.com/sitemap_index.xml

Both plugins generate the same default path. If neither URL works, try yourdomain.com/sitemap.xml — some configurations use that path.

Google Search Console open on a laptop showing sitemap submission interface

Submitting Your Sitemap to Google Search Console

Having a sitemap file is step one. Telling Google about it is step two.

  1. Open Google Search Console and select your property
  2. In the left sidebar, go to Indexing → Sitemaps
  3. Under “Add a new sitemap,” paste your sitemap URL (just the path after the domain: sitemap_index.xml)
  4. Click Submit

Search Console will fetch the sitemap, count the URLs, and report any errors it finds. The status column will show either “Success” or an error type you need to address.

You only need to submit your sitemap once. Google will re-fetch it periodically. That said, if you significantly restructure your site or add a major content section, re-submitting or submitting an updated sitemap URL is a good idea.

For deeper context on how sitemaps fit into your broader technical setup, the technical SEO for WordPress guide covers crawling, indexing, and related factors in full.

What to Include — and What to Exclude

Not every URL on your site deserves to be in your sitemap. Including low-value pages signals to Google that those pages are worth crawling, which wastes crawl budget and can dilute the quality signals your site sends.

Include:

  • Published posts and pages with unique, substantive content
  • Key taxonomy pages (category pages that have editorial value)
  • Custom post type archives if they have real content

Exclude:

  • Noindexed pages (your SEO plugin should handle this automatically)
  • Tag archive pages that just list posts by tag (typically thin)
  • Author pages on single-author sites
  • Paginated archive pages (page 2, page 3, etc.)
  • Admin, login, cart, and checkout pages
  • Duplicate or near-duplicate URLs
  • Pages under construction

In Yoast SEO, you control exclusions at SEO → Search Appearance → Content Types and Taxonomies — toggle off post types or taxonomies you do not want indexed, and they will be excluded from the sitemap. In Rank Math, equivalent controls are in Rank Math → Sitemap Settings.

Common Sitemap Issues and How to Fix Them

IssueCauseFix
Sitemap URL returns 404Plugin sitemap not enabled, or permalink structure not setGo to Settings → Permalinks, hit Save Changes (no change needed, just refreshes rewrite rules)
“Couldn’t fetch” in Search ConsoleServer blocks Googlebot, or the URL is wrongCheck the URL is correct; verify your server is not blocking crawlers
URLs missing from sitemapPost type or taxonomy excluded in plugin settingsEnable inclusion in your SEO plugin’s sitemap settings
Too many URLs in one fileLarge site exceeding the 50,000 URL limit per fileA good plugin automatically splits into multiple files; if not, configure it to do so
Sitemap includes noindexed pagesPlugin misconfigurationVerify that noindexed post types and taxonomies are excluded in SEO plugin settings
lastmod dates not updatingCaching layer serving stale sitemapClear all caches after publishing new content

Search Engine Journal has published a thorough breakdown of sitemap troubleshooting if you encounter an issue not covered here.

Sitemaps and Crawl Budget

Crawl budget is the number of URLs Googlebot will crawl on your site in a given period. For most small-to-medium WordPress sites, crawl budget is not a bottleneck — Google will crawl everything. But for large sites with thousands of pages, a clean sitemap that omits low-value URLs helps Googlebot focus its crawl on content that matters.

Google’s own guidance on crawl budget makes clear that submitting a sitemap does not guarantee all listed URLs will be crawled or indexed — it is a suggestion, not a directive. Keeping your sitemap clean and accurate is the best way to make that suggestion as useful as possible.

A Note on the Best WordPress SEO Plugins

If you are choosing an SEO plugin partly for its sitemap functionality, the best WordPress SEO plugins guide compares the leading options — including how each handles sitemaps, noindex settings, and Search Console integration.

Both Yoast SEO and Rank Math are solid choices and are actively maintained. Ahrefs’ Webmaster Tools can also help you verify that the URLs in your sitemap are actually indexed and generating traffic, which is a useful post-submission audit.

Conclusion

XML sitemaps are a small piece of the SEO puzzle, but they are an easy one to get right. WordPress either generates one automatically (if no SEO plugin is installed) or defers to your SEO plugin to generate a smarter, more configurable one. Submit it to Search Console, keep it clean by excluding low-value pages, and revisit it periodically to catch errors.

If you want to make sure your sitemaps and the rest of your technical SEO are in order, start with a full read of the technical SEO for WordPress guide. And if you have not chosen an SEO plugin yet, the best WordPress SEO plugins comparison will help you pick the right one for your site.

Related articles

Never miss a free theme

Get new free themes and practical WordPress guides in your inbox.