←back to Blog

How to set up a WordPress XML sitemap and submit it to Google Search Console for indexing

WordPress XML Sitemap: How to Set It Up and Get It Indexed by Google

A WordPress XML sitemap is the file that tells Google exactly which pages on a site exist and are worth crawling. Most WordPress site owners never look at theirs, and plenty don’t realize WordPress has been generating one automatically for years. That gap between “having a sitemap” and “actually using it right” is where indexing problems usually start.

Does WordPress Already Have an XML Sitemap?

Yes. Every WordPress site running version 5.5 or later generates a basic XML sitemap automatically, with no plugin required. It lives at yoursite.com/wp-sitemap.xml and updates on its own as content changes.

According to the official WordPress core development blog, this native sitemap index can hold up to 50,000 individual sitemaps, and each one can list up to 2,000 URLs, covering posts, pages, custom post types, categories, tags, and author archives by default. It’s genuinely useful, but it’s also bare-bones: no lastmod dates, no priority settings, and very little control over what gets included.

Where to Find Your WordPress Sitemap URL

The native sitemap sits at /wp-sitemap.xml, but if an SEO plugin is active, the URL is usually different. Yoast SEO uses /sitemap_index.xml, and Rank Math uses /sitemap_index.xml as well, both of which replace the native WordPress sitemap when the plugin is active.

To check which one a site is actually using, visit both URLs directly. Whichever one loads a real sitemap (rather than a 404) is the one currently active and the one that should get submitted to Google.

Native Sitemap vs. SEO Plugin Sitemap

FeatureNative WordPress (wp-sitemap.xml)SEO Plugin (Yoast / Rank Math)
Setup requiredNone, works automaticallyPlugin install and activation
Lastmod datesNot includedIncluded
Priority / changefreq controlNot availableConfigurable per content type
Exclude specific pagesLimited, needs custom codeBuilt into plugin settings
Best forSmall sites with no SEO plugin installedSites already running Yoast or Rank Math

If a site already runs an SEO plugin, its sitemap is almost always the better one to submit, mainly because of the added control over what search engines prioritize. Choosing between the two major plugins is covered in more depth in Rank Math vs Yoast SEO, which matters here because the plugin decision and the sitemap decision are the same decision.

How to Submit Your WordPress Sitemap to Google Search Console

Submitting a sitemap takes about two minutes once Google Search Console is connected to a site. It doesn’t guarantee indexing, but it tells Google exactly where to look, which speeds up discovery for new and updated pages.

  1. Confirm the site is verified in Google Search Console. If it isn’t yet, this Search Console setup guide covers that first.
  2. Open the correct sitemap URL in a browser tab and confirm it loads a real XML file, not a 404 or blank page.
  3. In Search Console, go to the Sitemaps section in the left-hand menu.
  4. Enter just the last part of the URL, for example sitemap_index.xml or wp-sitemap.xml, into the “Add a new sitemap” field.
  5. Click Submit and check back after a few hours to confirm the status shows “Success” rather than “Couldn’t fetch.”

Why Isn’t My WordPress Sitemap Getting Indexed?

A sitemap usually fails to get indexed because something is actively blocking Google from crawling it, not because the sitemap itself is broken. The most common culprits are a robots.txt file that disallows the sitemap or key pages, an accidental noindex tag, or a canonical tag pointing Google to a different URL entirely.

Robots.txt is worth checking first, since a single misplaced Disallow rule can quietly block an entire section of a site from being crawled at all. What to block and what to leave alone is covered in detail in this WordPress robots.txt guide. Changing the site’s permalink structure without proper redirects can also orphan old sitemap entries, which is one of the reasons that change needs to be handled carefully, as explained in the guide on WordPress permalink structure for SEO.

Search Console’s Pages report, under the Indexing section, lists the exact reason for every page that isn’t indexed. That report is more useful than guessing, since it separates real blockers from pages Google simply hasn’t gotten to yet.

How Long Does It Take Google to Index a New Sitemap?

Submitting a sitemap typically gets new pages crawled within a few days, though full indexing can take longer on newer or smaller sites. Submitting a sitemap doesn’t force immediate indexing, it just puts the URLs in front of Google faster than waiting for organic discovery through links.

Sites that are brand new, recently redesigned, or working with a limited crawl budget tend to see slower indexing regardless of sitemap submission. That’s normal, not a sign something is broken, and it usually resolves as the site builds up more history and internal links for Google to follow.

Frequently Asked Questions

Yes, every WordPress site running version 5.5 or later automatically generates a basic XML sitemap at /wp-sitemap.xml with no plugin needed. If an SEO plugin like Yoast or Rank Math is active, it typically replaces this native sitemap with its own, more configurable version.

Try visiting yoursite.com/wp-sitemap.xml for the native WordPress sitemap, or yoursite.com/sitemap_index.xml if an SEO plugin like Yoast or Rank Math is active. Whichever URL loads an actual XML file instead of a 404 error is the sitemap currently in use.

Most SEO plugins, including Yoast and Rank Math, automatically disable or override the native wp-sitemap.xml when activated, so there’s usually nothing extra to do. It’s worth confirming only one sitemap is live at a time, since submitting two conflicting sitemaps to Google Search Console can cause confusion in the Sitemaps report.

A 404 on the sitemap URL usually means the wrong URL is being checked, permalinks need to be re-saved, or a caching plugin is serving a stale, cached version of a page that no longer exists. Re-saving the permalink settings under Settings > Permalinks in WordPress, without changing the structure itself, often forces the sitemap to regenerate correctly.

Google doesn’t work off a fixed schedule, it recrawls a sitemap based on how often the site publishes new content and how much crawl budget Google allocates to that domain. Sites that publish regularly and keep a clean internal linking structure tend to get recrawled more frequently than sites that update rarely.

Leave a Reply

Your email address will not be published. Required fields are marked *