Sitemap for WordPress: Where Yours Is and What Should Be In It
Your WordPress site already has a sitemap. You almost certainly did not create it, and there is a decent chance you have two. That is the source of most WordPress sitemap confusion. This page explains where yours is, which one is in charge, what should and should not be in it, and how to fix the handful of things that commonly go wrong.
Where your sitemap is
| Setup | Sitemap address |
|---|---|
| WordPress with no SEO plugin | /wp-sitemap.xml |
| Yoast SEO | /sitemap_index.xml |
| Rank Math | /sitemap_index.xml |
| All in One SEO | /sitemap.xml |
| SEOPress | /sitemap.xml |
Not sure which applies? Open /robots.txt on your site and look for the line starting Sitemap:. That is the authoritative answer.
The built-in sitemap
Since WordPress 5.5, core has generated a sitemap automatically at /wp-sitemap.xml. No plugin, no setting, no action from you. It is a sitemap index that points to separate files for posts, pages, post types, taxonomies and author archives.
It is fine, and it is basic. It includes author archives whether or not you want them, gives you almost no control over what is excluded, and does not carry images. For a small site it is genuinely enough. For a site where search traffic matters, an SEO plugin gives you the control.
Turning the built-in one off
Install an SEO plugin and it will normally disable the core sitemap for you, so you are not publishing two competing lists. Worth confirming rather than assuming: visit /wp-sitemap.xml after installing. If it still loads alongside your plugin’s sitemap, the plugin has not taken over and you should check its settings.
Two live sitemaps is not a catastrophe — crawlers cope — but it is untidy and it means half your exclusion rules are being ignored by whichever file you forgot about.
What should be in a WordPress sitemap
Include everything you want found, and nothing else.
Include
- Pages
- Posts
- Custom post types you publish publicly — products, guides, case studies, events
- Category archives, if they have real content and you have written descriptions for them
Exclude
- Author archives on a single-author site. They duplicate your blog listing exactly.
- Tag archives, unless you use tags deliberately and each has several posts. Most sites have a hundred tags with one post each.
- Date archives. Almost never useful.
- Attachment pages. WordPress creates a page for every uploaded image. These are thin by definition. Redirect them to the file itself — every major SEO plugin has this setting.
- Thank-you, login and account pages.
- Anything set to no-index. A page marked no-index should not be in the sitemap; the two settings contradict each other.
Attachment pages are worth singling out. On a photography or portfolio site they can outnumber your real pages several times over, and they are the single most common cause of a WordPress sitemap that is enormous and useless.
Custom post types: the common miss
If your site uses custom post types — a plugin, a theme, or a developer set these up — check they are in the sitemap. SEO plugins usually include public custom post types by default, but not always, and some plugins register their post types in ways that get missed.
In Yoast this lives under Search Appearance, with a tab per content type and a “show in search results” switch that also controls sitemap inclusion. Rank Math has an equivalent under Titles & Meta. Set it once and check the output.
The way to verify is to look, not to trust the setting. Pull the URL list with our sitemap extractor and see whether your custom post type URLs are actually in there.
WooCommerce
Products are a custom post type, so everything above applies. Two extras:
- Product category and tag archives. Categories are usually worth including — they are real landing pages. Tags usually are not.
- Cart, checkout and account pages. These should be no-indexed and out of the sitemap. WooCommerce sets sensible defaults but a theme or a plugin can undo them.
On a large catalogue, expect the sitemap to be split across several files. That is correct behaviour, not a bug — the limit is 50,000 URLs per file.
Problems that come up on WordPress specifically
| Problem | Cause | Fix |
|---|---|---|
| Sitemap shows a 404 | Permalinks set to Plain, or rewrite rules stale | Set permalinks to Post name and re-save to flush the rules |
| XML parsing error on line 1 | A plugin printing a notice before the XML declaration | Deactivate plugins one at a time to find it |
| Sitemap not updating | Aggressive page caching, or a CDN caching the XML | Exclude sitemap files from your cache rules |
| Two sitemaps live at once | SEO plugin did not disable the core one | Check the plugin settings, or add a filter to disable core sitemaps |
| Thousands of image URLs | Attachment pages included | Redirect attachment URLs to the file, in your SEO plugin |
| Old deleted pages still listed | Cached sitemap | Clear the cache, then re-check |
The caching one deserves emphasis. A caching plugin that serves a three-week-old sitemap is invisible to you — the file loads, it looks fine — and it means every crawler is working from an out-of-date list. If you publish regularly and your sitemap’s newest entry is not recent, that is your answer.
Check it, do not assume it
Every point above is a setting somebody could have changed. The only reliable move is to look at the output.
- Find your sitemap — see how to find the sitemap of a website if the table above did not cover you.
- Run it through our sitemap validator to confirm it parses and the URLs resolve.
- Pull the full list with the sitemap extractor and read it. Confirm your ten most important pages are present.
- For the full audit, follow how to check a sitemap.
Sitemaps and AI on WordPress
One more reason to care, and it is newer than SEO. If you put an AI chatbot on your WordPress site, it learns your business by crawling it — and it starts from your sitemap. A page that is not listed is a page the bot has never read.
This catches WordPress users in a particular way, because the pages people most want a bot to know about — delivery, returns, pricing, opening hours — are often built as pages excluded from search at some point in the past by someone tidying up. The setting made sense then. It means your chatbot cannot answer your most common question now.
Before installing anything, run an answerability check to see which questions your published content actually covers. If you are choosing a tool, we cover the options in AI chatbot for WordPress.
Frequently asked questions
Does WordPress create a sitemap automatically?
Yes. Since WordPress 5.5, core generates one at /wp-sitemap.xml with no plugin required.
Do I need Yoast for a sitemap?
No. You need a plugin only if you want control over what is included, image entries, or the other SEO features that come with it.
Why does my WordPress sitemap return a 404?
Usually permalinks. If they are set to Plain, sitemap rewrite rules do not work. Change to Post name and save the permalinks page to flush the rules, even if you change nothing.
Should author archives be in my sitemap?
Not on a single-author site — the author archive duplicates your blog listing. On a multi-author site with genuine author pages, include them.
How do I remove a page from my WordPress sitemap?
Set it to no-index in your SEO plugin. Every major plugin removes no-indexed content from the sitemap automatically, so one setting covers both.
My sitemap is not updating after I publish. Why?
Caching, almost always. A caching plugin or CDN is serving an old copy of the XML. Exclude sitemap files from your caching rules.