Black Friday Sale is Live: Get up to 30% OFF RankReady Pro - the WordPress AI SEO pluginBlack Friday Sale is Live: Up to 30% OFF Get Deal
WordPress

WordPress Sitemap: Where It Is and How to Fix It

26 Oct 2026 7 min read

A WordPress sitemap is an XML file that lists the pages you want search engines to know about. WordPress makes one for you, your SEO plugin probably makes another, and which one is in charge decides the address. When a sitemap breaks, the symptoms are quiet: pages are found slowly, Search Console reports an error, or the file loads and lists the wrong things.

This post covers where your sitemap is, how to tell which one you have, what should and should not be in it, and how to fix the usual faults. It is about the file and what it contains. How Google treats the pages in it is a separate question, and it comes up again below.

Where the WordPress sitemap is

Since WordPress 5.5, core has served a sitemap at /wp-sitemap.xml. The WordPress core team’s announcement of it says that by default it covers public post types, public taxonomies, author archives and the homepage. In the comments on that post, a core developer adds that it is generated on request and not saved as a file, and that plugins such as Yoast SEO switch the core sitemap off in favour of their own.

That is the situation on most sites: a core sitemap that exists, and an SEO plugin that replaces it at a different address. On this site, SEOPress serves the sitemap at /sitemaps.xml, and requests for /wp-sitemap.xml, /sitemap.xml and /sitemap_index.xml all end up there. We checked it live, and the robots.txt names that address too.

Who makes itAddressNotes
WordPress core/wp-sitemap.xmlGenerated on request, with up to 2,000 URLs per sitemap by default
Your SEO pluginSet by the pluginUsually replaces the core sitemap, so check the plugin’s own settings
This site, with SEOPress/sitemaps.xmlThe other common addresses redirect to it

How to see which one you have

Do not assume. Ask the site. This loop requests the common addresses and prints where each one ends up, and the second command shows what your robots.txt says.

for p in wp-sitemap.xml sitemap.xml sitemap_index.xml sitemaps.xml; do curl -s -o /dev/null -L -w "%{http_code} %{url_effective}  $p\n" https://yourdomain.com/$p; done
curl -s https://yourdomain.com/robots.txt | grep -i sitemap

If every address ends at the same file and returns 200, you have one sitemap. If two different files return 200, two things are generating them, and you should find out which one is yours. A single sitemap, named in robots.txt, is the aim. The file itself is explained in our WordPress robots.txt guide.

What Google says about sitemaps

Google’s guide to building a sitemap is plain. XML, RSS and text formats are all supported, and Google has no preference. A single sitemap is limited to 50MB uncompressed or 50,000 URLs, and larger sites split them and use an index file. Sitemaps should be UTF-8, and Google recommends the site root. You can tell Google about one through the Sitemaps report in Search Console, through the API, or with a Sitemap line in robots.txt.

The sentence that matters most is the one about what a sitemap does. Google calls a submission a hint, and says it may not download the file or use it for crawling. It also says to list the canonical URLs you want shown in results, written as full absolute addresses. A sitemap helps Google find pages. It does not make them be indexed.

What should be in it

The rule is simple: every URL in the sitemap should be a page you want found, that returns 200, is not redirected, and is not marked noindex. Anything else sends a mixed message, because the sitemap says crawl this and the page says do not index it.

URL typeUsually in the sitemap?Why
Posts and pagesYesThese are the content
CategoriesYour callUseful if each has its own text and purpose
TagsOften noMany tag pages are thin lists of the same posts
Author archivesYour callOn a one-author blog they can duplicate the posts list
Attachment pagesNoThey rarely carry content of their own
Search results pagesNeverThey are generated and endless
Redirected or noindex pagesNeverThe sitemap should only list pages you want kept

Core includes taxonomies and author archives by default, as the announcement says, so a site on the core sitemap may list pages it does not mean to. An SEO plugin lets you leave them out. Which choice is right depends on the site, and best SEO plugin for WordPress covers picking the plugin that makes the decision.

The usual faults and the fixes

FaultWhat you seeWhat to do
The sitemap returns 404The address loads an error pageCheck which plugin should be serving it, and save the permalink settings again so the rewrite rules refresh
Search engine visibility is set to discourageThe core sitemap is missing or returns a 404, and the page source has a noindex tagCore switches its sitemap off while the Discourage search engines setting is on. Untick it in Settings, Reading when the site is ready to be found
The sitemap returns a 501A server error on a core sitemapWordPress core needs the SimpleXML PHP extension, so ask the host to enable it
Two sitemapsDifferent files at different addressesLeave one in charge, and turn the other off
Redirected URLs listedThe sitemap names http or www addresses that redirectFix the site address setting, and regenerate
Noindex pages listedSearch Console flags a conflictRemove the pages from the sitemap, or remove the noindex
Search Console cannot fetch itThe report says the file could not be readCheck robots.txt, the firewall and any security plugin
Staging URLs listedThe addresses name another domainCorrect the site address, then clear the plugin’s cache

The 501 detail comes from the core announcement, which says the SimpleXML PHP extension is required and that without it the server returns a 501. A redirect problem in the sitemap is usually a symptom of a wrong site address. The rest of that problem is covered in choosing between a redirect plugin and a server rule.

Count what is in it

Two commands tell you how big the sitemap is and whether the pages in it are healthy. If your sitemap is an index, as it is on this site, the first counts the sitemaps it lists and not the pages. The second reads one of those sitemaps and prints the status code for each of its first twenty addresses.

curl -s https://yourdomain.com/sitemaps.xml | grep -o '<loc>' | wc -l
curl -s https://yourdomain.com/post-sitemap1.xml | grep -oE  '<loc>[^<]+' | sed 's/<loc>//' | head -20 | while read u; do curl -s -o /dev/null -w "%{http_code} $u\n" "$u"; done

Change the addresses to match yours, using a sitemap address listed in your own index file. Anything other than 200 in the second result is a page that should not be there, and it is worth fixing today. If you are in the middle of a move, the sitemap is one of the first things to check, and the site migration SEO checklist shows where it fits.

Submit it, then leave it alone

Submit the sitemap once in Search Console, and make sure robots.txt names it. WordPress adds a reference to its core sitemap automatically, and SEO plugins normally add their own. Then stop resubmitting. A healthy sitemap needs no attention, and the time is better spent on the pages in it. If pages in the sitemap are not being indexed, that is not a sitemap fault, and it is the subject of the next post in this series.

The monthly habit is small. Open the sitemap report, check that the last read date is recent, and check that the number of discovered URLs is close to the number of pages you expect. A big gap either way is the signal. What to actually monitor on a WordPress site covers what else belongs on that monthly list.

Last checked in October 2026 against Google’s sitemap guide and the WordPress 5.5 announcement. Sitemap behaviour depends on your plugins, so confirm with the commands above.

Where Host My Blog fits

A sitemap is one of the quiet things that breaks without a message, which is the argument in what breaks on a WordPress site when nobody is watching. On the blogs we look after, the 404 and redirect review in a normal month would catch a sitemap that started listing bad addresses. If you would rather not be the one who notices, our care for bloggers includes it.

If you opened your sitemap right now, would every address in it return a 200?

Share this
Aditya Sharma
Written by

Aditya Sharma

Host My Blog

Aditya runs Host My Blog and writes The Cited. Five years in WordPress, most of it spent on what actually makes a blog get found rather than what is supposed to. His attention now goes to how AI answers are changing that, and what a blog has to do to still be the source people land on. Everything he writes about here gets tested on the blogs Host My Blog looks after before it reaches the page.

Comments 0

Your email stays private. Be kind.
We’ll handle the technical half

Want your posts in
AI answers, without the work?

Schema, speed and structure are included on every Host My Blog plan. You write; we make sure the machines can read it.

Get tips by email