By SitemapFixer Team
Updated April 2026

WordPress Sitemap: Complete Setup and Fix Guide

Validate your WordPress sitemap freeCheck My Sitemap

WordPress generates an XML sitemap automatically if you are using a modern version (5.5 or newer) or an SEO plugin. The default location is yoursite.com/wp-sitemap.xml. If you use Yoast SEO, it is at yoursite.com/sitemap_index.xml. RankMath also uses /sitemap_index.xml.

Option 1: WordPress Built-in Sitemap (No Plugin)

Since WordPress 5.5, a basic sitemap is included by default. Go to yoursite.com/wp-sitemap.xml to check if it exists. It is automatically updated when you publish or update content. The limitation is that it does not give you control over what is included - it includes all public post types and taxonomies. If you need to exclude pages or prioritize certain content, use a plugin instead.

Option 2: Yoast SEO Sitemap

Yoast is the most popular WordPress SEO plugin and its sitemap is more configurable than the built-in one. After installing Yoast, go to Yoast SEO in your WordPress dashboard, then select Features, and make sure XML Sitemaps is toggled on. Your sitemap will be at yoursite.com/sitemap_index.xml. This is a sitemap index that links to individual sitemaps for posts, pages, categories, and other post types. In Yoast settings you can exclude specific post types, taxonomies, or individual pages from the sitemap.

Option 3: RankMath Sitemap

RankMath is a newer SEO plugin that many users prefer for its interface. Go to RankMath in your dashboard, then Sitemap Settings. You can configure which post types and taxonomies to include, set the number of links per sitemap, and enable image sitemaps and video sitemaps. Your sitemap will be at yoursite.com/sitemap_index.xml.

Common WordPress Sitemap Problems

Sitemap returns 404

If your sitemap URL returns a 404, the most common cause is a permalink structure issue. Go to Settings, then Permalinks in your WordPress dashboard, and click Save Changes without changing anything. This flushes the rewrite rules and often fixes the 404. If you are using a plugin, deactivate and reactivate it.

Multiple sitemaps conflicting

If you have both Yoast and RankMath installed, or Yoast and the WordPress built-in sitemap both active, Google gets conflicting signals. Only use one sitemap source. Disable the WordPress core sitemap if you are using a plugin by adding this to your functions.php: add_filter( "wp_sitemaps_enabled", "__return_false" );

Noindex pages appearing in sitemap

Pages with a noindex meta tag should not appear in your sitemap. Yoast excludes noindex pages from the sitemap by default. If you are using the built-in sitemap, noindex pages may still appear - this is a known limitation. Use a plugin to control this properly.

Sitemap too large

If your site has thousands of URLs, your sitemap will automatically be split into multiple files linked from a sitemap index. This is handled automatically by Yoast and RankMath. The default limit is 1,000 URLs per sitemap file in Yoast (configurable in settings).

How to Submit Your WordPress Sitemap to Google

Go to Google Search Console (search.google.com/search-console). Select your property, then click Sitemaps in the left menu. Enter your sitemap URL - typically sitemap_index.xml or wp-sitemap.xml - and click Submit. Google will fetch and process the sitemap within 24-48 hours. Check back to see the status and any errors it found.

Check your WordPress sitemap for errors
Free analysis - checks every URL in 60 seconds
Analyze My Sitemap Free
Related guides

Related Guides