Learn line
WordPress sitemaps: core, Yoast, Rank Math and manual
WordPress already makes a sitemap. What matters is knowing which one is live, what it leaves out, and when a hand-built file should sit next to it.
Which sitemap is your site serving?
| Setup | Sitemap URL | Notes |
|---|---|---|
| WordPress core 5.5+ | /wp-sitemap.xml | No lastmod on the index; includes user archives |
| Yoast SEO | /sitemap_index.xml | Disables core; adds images and lastmod |
| Rank Math | /sitemap_index.xml | Disables core; per-type toggles |
| All in One SEO | /sitemap.xml | Disables core |
Only one should be active. Two plugins each generating a sitemap, or core plus a plugin, leads to duplicate submissions and confusing Search Console reports.
Common WordPress sitemap problems
- 404 on the sitemap URL. Flush permalinks (Settings → Permalinks → Save).
- Blank page or XML error. A plugin or theme outputs whitespace before the XML. Deactivate plugins one by one, or check
functions.phpfor a trailing newline after?>. - Cached HTML version. Exclude
*sitemap*.xmlfrom page caching and minification. - Noindexed content listed. Check the post type settings in your SEO plugin; the sitemap should mirror what is indexable.
When to generate one by hand
For URLs outside WordPress's database: a static tool in /calculator/, a headless front end, a landing-page builder on a subpath, or a list of legacy URLs during a migration.
- Build the file with the generator (e.g.
sitemap-extra.xml). - Upload it to the web root over SFTP or your host's file manager.
- Add a second
Sitemap:line in robots.txt, or submit it in Search Console.
Questions people ask
Does WordPress have a built-in sitemap?
Yes. Since WordPress 5.5 core generates
/wp-sitemap.xml, an index of posts, pages, custom post types, taxonomies and author archives. SEO plugins such as Yoast and Rank Math disable it and serve their own.Where is my WordPress sitemap?
Try
/sitemap_index.xml (Yoast, Rank Math), /wp-sitemap.xml (core) or /sitemap.xml (some plugins, often redirecting to one of the others). Or let the sitemap finder check them all.Do I need a sitemap plugin?
Not necessarily. Core’s sitemap is valid and adequate for most blogs. SEO plugins add controls (exclude post types, image entries, a lastmod on the index) and remove things like user archives you may not want listed.
When would I use a manual sitemap on WordPress?
For URLs WordPress doesn’t know about: a static microsite in a subfolder, a headless front end, landing pages served by another app, or a one-off sitemap for a migration. Upload the generated file to the web root and add it to robots.txt next to the plugin’s sitemap.
Why does my WordPress sitemap show a 404?
Usually stale rewrite rules. Go to Settings → Permalinks and click Save without changing anything. Also check that a caching or security plugin isn’t intercepting the sitemap URL.