How to Create an XML Sitemap in WordPress and Submit It to Google

WordPress generates an XML sitemap automatically. Most site owners don’t know it exists until they start paying attention to how Google is crawling their site — and by then they’ve often been missing an easy indexing opportunity for months.

An XML sitemap is a file listing all the URLs on your site in a structured format search engines can read directly. It doesn’t guarantee Google will index every page, but it hands the crawler a clear map of what exists — which matters most on newer sites that haven’t built up many incoming links yet for Google to follow instead. Google’s own sitemap documentation confirms sitemaps are particularly valuable for large sites, new sites, and sites with pages that aren’t well linked internally — which describes most WordPress sites in their early stages.

Where Your Sitemap Already Lives

WordPress has generated a default XML sitemap automatically since version 5.5 — no plugin, no configuration. Visit yourdomain.com/wp-sitemap.xml and you’ll see an index file linking out to individual sitemap files for posts, pages, categories, tags, and authors: wp-sitemap-posts-post-1.xml, wp-sitemap-posts-page-1.xml, wp-sitemap-taxonomies-category-1.xml, wp-sitemap-taxonomies-post_tag-1.xml, and wp-sitemap-users-1.xml.

Each sub-sitemap holds a maximum of 2,000 URLs — a deliberate limit set well below the sitemap protocol’s own 50,000-URL ceiling, because WordPress core’s own developers found that generating a query for more than a couple thousand URLs starts to noticeably slow the site down. Once a content type passes that threshold, WordPress automatically splits it into numbered files (-2.xml, -3.xml, and so on), and the number is adjustable per content type via the wp_sitemaps_max_urls filter if you ever need to change it. For the vast majority of WordPress sites, this ceiling is never visible in practice — you’d need over 2,000 published posts before it even matters.

The sitemap index itself has its own separate cap — up to 50,000 individual sitemap files, each holding up to 2,000 URLs — which works out to a theoretical ceiling of 100 million URLs across the whole structure before WordPress’s built-in sitemap system would need any adjustment at all. That headroom is one reason there’s rarely a technical need to reach for a dedicated SEO plugin’s sitemap module purely for scale; the core implementation was built to handle far more than almost any WordPress site will ever publish.

Submitting It to Search Console

Before submitting, your site needs to be verified in Google Search Console — if that’s not done yet, setting up Google Search Console for a new WordPress website walks through verification and initial configuration.

Once you’re in: select your property from the top-left dropdown if you manage more than one site, click Sitemaps under the Index section in the left menu, type wp-sitemap.xml into the Add a new sitemap field (your domain is already prefilled), and click Submit. Google attempts to fetch it immediately — within a minute or two it appears in the Submitted sitemaps list with a Success status and a count of discovered URLs. You only ever need to submit the index sitemap; Google reads it and follows the links to every sub-sitemap on its own.

Checking the Right Pages Are Actually In There

Open each sub-sitemap in your browser and scan the URLs for two things: that pages you want indexed are present, and pages you don’t want indexed aren’t. Password-protected posts, drafts, and anything set to noindex are excluded by default — but on the default WordPress sitemap without a plugin, exclusion control is limited; the sitemap includes all published public content as-is.

Author archive pages are included by default too. On a single-author site, that archive is harmless but adds little value; excluding it means adding a filter to your theme’s functions.php or using a plugin that gives you sitemap controls. And don’t confuse the sitemap with your robots.txt file — robots.txt controls which pages crawlers are allowed to visit, the sitemap tells them which pages exist, and both should list the same public content. A page blocked in robots.txt but still present in the sitemap sends a mixed signal Google has to resolve on its own.

Reading the Submitted-vs-Indexed Gap

Search Console’s sitemap report shows how many URLs were submitted against how many are actually indexed. A large gap — 80 submitted but only 20 indexed, say — almost always points to thin content, duplicate content, or pages Google simply doesn’t consider worth indexing, rather than a technical sitemap problem. Resubmit the sitemap after any major restructure: a permalink change, a large batch of new posts, or a batch of deletions, since Search Console keeps a record of every submission. Otherwise there’s nothing to maintain — the sitemap regenerates dynamically every time it’s requested, so it always reflects the site’s current state with no action needed on publish.

If the Sitemap Returns an Error

If yourdomain.com/wp-sitemap.xml 404s, shows blank, or won’t appear in Search Console, check in this order: permalinks — go to Settings → Permalinks and click Save Changes without altering anything, which flushes rewrite rules and often restores the sitemap after a settings change; search engine visibility — Settings → Reading, confirm “Discourage search engines from indexing this site” is unchecked, since the sitemap still exists but goes uncrawled while it’s checked; plugin conflicts — a security or caching plugin may be blocking the URL, so deactivate plugins one at a time and recheck; and caching — clear any caching plugin after changes, since a stale cached sitemap can show outdated data in Search Console even after the underlying issue is fixed. One more common mistake worth avoiding from the start: using an SEO plugin that generates its own sitemap and disables the WordPress default — if that’s your setup, submit the plugin’s sitemap URL instead of wp-sitemap.xml, since running two active sitemaps creates confusion rather than benefit. And submission speeds up discovery but doesn’t guarantee a timeline; new pages on new sites can still take days to weeks to appear even after a clean submission.

Sitemaps help Google discover pages, but discovery is only half the picture — once a page is found, its internal linking strategy is what signals which pages actually matter and keeps them getting crawled regularly. Submit wp-sitemap.xml to Search Console early in a site’s life and leave it — it stays current on its own, and Search Console shows how many pages are being indexed over time. If your basic SEO setup is working, the indexing data here is where you’ll see it confirmed; the full picture on checking that is in checking whether your WordPress website is indexed by Google. Start at Veravix for the rest of building a well-structured WordPress site.