All posts
How-To Guides

WordPress Sitemap: How to Generate, Check, and Submit Yours

Everything WordPress site owners need to know about sitemaps — which plugin to use, where to find your sitemap URL, how to fix errors, and how to submit to Google.

June 19, 2026·5 min read

WordPress handles sitemaps better than almost any other platform — once you know where to look. The challenge is that there are three different ways a WordPress site can generate a sitemap (core, Yoast, Rank Math), and if you have conflicting setups, search engines may be looking at the wrong one. This guide cuts through the confusion.

Where Is My WordPress Sitemap?

Check these URLs in order — whichever one returns an XML file is your active sitemap:

  • yourdomain.com/sitemap_index.xml — Yoast SEO or Rank Math (most common)
  • yourdomain.com/wp-sitemap.xml — WordPress Core (no plugin)
  • yourdomain.com/sitemap.xml — some themes or caching plugins generate this

If you have Yoast or Rank Math installed, they take over sitemap generation from WordPress Core. The core sitemap at /wp-sitemap.xml is automatically disabled when either plugin is active.

Option 1 — Yoast SEO (Recommended)

Yoast is the most widely used WordPress SEO plugin and generates a robust sitemap index automatically.

  1. Go to SEO → General → Features in your WordPress admin.
  2. Confirm XML sitemaps is toggled on. If it's off, turn it on and save.
  3. Click the ? icon next to XML sitemaps, then See the XML sitemap to confirm it's working.

Yoast generates a sitemap index at /sitemap_index.xml that links to separate sub-sitemaps for posts, pages, categories, tags, and authors. It updates automatically when you publish, edit, or delete content.

To exclude specific post types or taxonomies, go to SEO → Search Appearance and set the post type to "noindex" — Yoast will remove it from the sitemap automatically.

Option 2 — Rank Math

Rank Math is a strong alternative with a more granular sitemap configuration.

  1. Go to Rank Math → Sitemap Settings.
  2. Enable Links Per Sitemap (default 200 is conservative — you can increase it to 1,000 for larger sites).
  3. Under each content type tab (Posts, Pages, etc.), confirm "Include in Sitemap" is on for the types you want indexed.

Your sitemap index is at /sitemap_index.xml — the same URL as Yoast, so switching between the two doesn't require updating your Search Console submission.

Option 3 — WordPress Core (No Plugin)

Since WordPress 5.5, a basic sitemap is built in at /wp-sitemap.xml. It includes all public post types and taxonomies but doesn't support fine-grained control over what's included, doesn't generate lastmod timestamps, and can't exclude specific pages. It's fine for simple sites; install Yoast or Rank Math if you need more control.

Common WordPress Sitemap Problems

Sitemap returns a 404

This usually means your permalink structure isn't set correctly. Go to Settings → Permalinks and click Save (without changing anything). This flushes the rewrite rules and almost always fixes sitemap 404s.

Sitemap includes pages I don't want indexed

In Yoast: edit the page → Yoast SEO meta box → Advanced tab → set "Allow search engines to show this page in search results" to No. In Rank Math: edit the page → Rank Math meta box → Advanced → Robots Meta → check "No Index". The page will be removed from the sitemap on the next crawl.

Sitemap is missing recent posts

If a post you published isn't appearing in the sitemap, check whether it's set to "draft" or "private" — only published posts appear. Also verify the post type isn't excluded from sitemaps in your plugin settings. A caching plugin aggressively caching the sitemap can also cause stale results — purge the sitemap cache after publishing.

Multiple sitemaps from different sources

If you've switched SEO plugins, you may have stale sitemap entries in Search Console pointing to the old URL. Remove the old submission from Google Search Console, submit the correct current URL, and confirm only one plugin is generating sitemaps (Yoast and Rank Math should not both be active).

Submitting Your WordPress Sitemap to Google

  1. Open Google Search Console and select your property.
  2. Click Sitemaps in the left sidebar.
  3. Enter sitemap_index.xml and click Submit. (Or wp-sitemap.xml if you're using WordPress Core.)

You only need to submit once. Google re-fetches the sitemap regularly from then on. Resubmit manually only after major structural changes like a domain migration or a large content reorganisation.

Checking Your Sitemap Health

Generating a sitemap is only half the job. The URLs inside it should all return HTTP 200 — any 404s or redirect chains in your sitemap list signal low content quality to search engines and waste crawl budget. Run a crawl of your site periodically to check URL health and catch broken links before they compound into a larger problem.

Try it free

Generate and check your sitemap in minutes

Crawl up to 2,000 URLs for free — no credit card required. See your health score and download your sitemap XML instantly.

Generate your sitemap →