WordPress

WordPress XML Sitemap: How to Find, Fix and Submit It

Where your WordPress XML sitemap is, why it can show a 404, whether you need a plugin, and how to submit it to Google Search Console, with real screenshots.

By wptaskify TeamUpdated Oct 17, 20268 min read
WordPress XML Sitemap: How to Find, Fix and Submit It

Quick answer

WordPress creates an XML sitemap on its own at yoursite.com/wp-sitemap.xml (since version 5.5). If you use an SEO plugin such as Yoast or Rank Math, it replaces that with its own, usually at /sitemap_index.xml. To get it used, submit the sitemap URL in Google Search Console under Indexing, then Sitemaps. If the sitemap shows a 404, check that Settings, then Reading, then "Discourage search engines" is not ticked.

What an XML sitemap is

An XML sitemap is a file that lists the pages on your site you want search engines to find, with the date each one last changed. It does not make pages rank, and Google can find most pages through links anyway. It helps most on new sites with few links, large sites, and pages that are hard to reach from your menus.

Here is part of the real sitemap from our test site, a plumbing business with 131 pages:

Real WordPress XML sitemap code with url, loc and lastmod entries for the About and drain cleaning pages
One entry per page: the address and when it last changed.

Where to find your WordPress sitemap

Open these addresses on your own domain until one loads:

  • /wp-sitemap.xml: the one built into WordPress. /sitemap.xml redirects to it.
  • /sitemap_index.xml: Yoast SEO and Rank Math.
  • /sitemap.xml: All in One SEO and several others.

The easiest check of all: open /robots.txt. WordPress and most SEO plugins add a Sitemap: line pointing at the right file.

WordPress robots.txt with User-agent, Disallow wp-admin and a Sitemap line pointing to wp-sitemap.xml
Our test site's robots.txt. WordPress adds the Sitemap line itself.

The built-in WordPress sitemap

WordPress's own sitemap is an index: a short list of smaller sitemaps, one per content type. On our test site it had four: posts, pages, categories and users (author pages). Each one holds up to 2,000 addresses, and WordPress adds more files when you pass that.

WordPress wp-sitemap.xml index listing four sitemaps: posts, pages, category taxonomy and users
The real sitemap index on our test site: four smaller sitemaps.

What is inside each sitemap

Click one and you see the pages in it with their last modified dates. Our pages sitemap listed all 131 pages. Browsers show it as a table because WordPress attaches a stylesheet; search engines read the plain XML underneath.

One thing to tidy on a business site: the users sitemap lists author archive pages (/author/admin/), which are rarely useful in search. An SEO plugin can switch those off, or a developer can remove them with the wp_sitemaps_add_provider filter.

WordPress pages sitemap showing 131 URLs with last modified dates
The pages sitemap: 131 real pages, each with its last change date.

Sitemap shows a 404? Check this setting first

The most common reason a WordPress sitemap is missing: the box Discourage search engines from indexing this site under Settings, then Reading. When it is ticked, WordPress turns its sitemap off and /wp-sitemap.xml returns "Page not found". We saw exactly that on our test site, which is kept private on purpose.

The box is often left ticked after a site is built on staging. Untick it, save, and reload the sitemap. Other causes:

  • Permalinks. Go to Settings, then Permalinks and click Save without changing anything. This rebuilds the URL rules.
  • A plugin replaced it. SEO plugins switch the core sitemap off and serve their own at another address, so look for that one instead.
  • Caching. Clear your cache plugin and CDN cache after changes.
WordPress Reading Settings with Discourage search engines from indexing this site ticked
When this box is ticked, WordPress's sitemap returns a 404.

Do you need a sitemap plugin?

For a small or medium site, no: the built-in sitemap is enough. A plugin sitemap is worth it when you want more control, such as leaving out certain pages, adding images, or a separate news sitemap. If you already use Yoast, Rank Math or All in One SEO, you already have a plugin sitemap; use that one.

The free wptaskify plugin also has an optional sitemap. It is off by default so it never replaces one you already use. When it is on, it lists your published pages and posts, leaves out anything you set to noindex, and shows a readable table in the browser:

wptaskify plugin XML sitemap shown as a table with 132 URLs, priority and last modified dates
The wptaskify plugin's sitemap on our test site, with the switch under wptaskify, then Tools.

Priority and changefreq: ignore them

Many sitemaps, ours included, print a priority (such as 0.7) and a changefreq (such as weekly) for each page. Google has said it ignores both. What it does use is lastmod, as long as the date is accurate. So the useful thing is that the last modified date only changes when the page really changes.

How to submit your sitemap to Google

  1. Open Google Search Console and select your site.
  2. Go to Indexing, then Sitemaps.
  3. Type the sitemap address (for example wp-sitemap.xml or sitemap_index.xml) and click Submit.
  4. Come back in a day or two. The status should say Success, with the number of pages found.

Do the same in Bing Webmaster Tools; Bing also feeds several AI assistants. You only need to submit once: search engines re-read the sitemap on their own. The old "ping" addresses for telling Google and Bing about a new sitemap were retired in 2023, so plugins that still offer pinging do nothing useful.

Submit and check it with your AI

If your site and Google Search Console are connected to Claude or ChatGPT through wptaskify, you can do this in one sentence. gsc_submit_sitemap submits or resubmits the sitemap, and gsc_list_sitemaps shows its status, when Google last read it, and any warnings or errors. Search Console tools need a paid plan.

Example conversation: the AI submits the sitemap with gsc_submit_sitemap and checks it with gsc_list_sitemaps
An example conversation using the real gsc_submit_sitemap and gsc_list_sitemaps tools.

Sitemap mistakes to avoid

  • Two sitemaps. Pick one source (WordPress, your SEO plugin, or wptaskify) and submit only that.
  • Pages you do not want indexed. Thank-you pages, test pages and thin tag pages should be set to noindex, which also keeps them out of a good sitemap.
  • Redirected or deleted URLs. A sitemap should list only live pages that return 200. If you moved pages, see how to set up 301 redirects.
  • Blocking the sitemap in robots.txt. Check your rules with our robots.txt guide.

Frequently asked questions

Does WordPress have a built-in sitemap?

Yes. Since WordPress 5.5, every site has one at /wp-sitemap.xml, unless an SEO plugin replaces it or the site is set to discourage search engines.

Why does my WordPress sitemap show a 404?

Usually because Discourage search engines from indexing this site is ticked under Settings, then Reading. Otherwise, re-save your permalinks, clear caches, or look for the sitemap your SEO plugin serves at another address.

Where is the Yoast or Rank Math sitemap?

Both use /sitemap_index.xml. When either is active, the WordPress sitemap at /wp-sitemap.xml is switched off.

How do I submit my sitemap to Google?

In Google Search Console, open Indexing, then Sitemaps, enter the sitemap address and click Submit. You only need to do this once.

Does a sitemap help my site rank?

Not directly. It helps search engines find and recrawl your pages, which matters most for new and large sites. Rankings depend on the pages themselves.

Submit and monitor your sitemap with your AIBring your own Claude or ChatGPT. Nothing goes live without your approval.
Get started free

Your AI is ready to work.

Connect WPTaskify and turn conversations into real actions.

Start Free