An XML sitemap is one of the quietest yet most important files on your WordPress site. It tells search engines exactly which pages exist, how they relate to each other, and when they were last updated. Without one, Google has to discover your content through crawling alone, which means new posts can take longer to index and some pages may be missed entirely.

Setting up an XML sitemap in WordPress is straightforward, but there are a few decisions along the way that affect how well it works. This guide walks you through the entire process, from checking your current setup to submitting your sitemap to Google Search Console and resolving the issues that trip most people up.

Why XML sitemaps matter for WordPress SEO

An XML sitemap gives search engines a clean, structured list of your site’s URLs. Rather than relying purely on link discovery, Googlebot can read your sitemap and prioritize crawling the pages you actually want indexed. This is especially valuable when your site is new, when you publish frequently, or when you have pages that are not well linked internally.

For WordPress SEO, a well-configured sitemap also signals content freshness. Every time you update or publish a post, the sitemap reflects that change, prompting search engines to revisit the URL sooner. On larger sites with dozens or hundreds of pages, a sitemap becomes less optional and more essential. It is the difference between crawl budget spent efficiently and crawl budget wasted on low-value or duplicate URLs.

What to check before creating your sitemap

Before generating a sitemap, confirm that you are not already producing one. Duplicate sitemaps, or conflicts between multiple plugins trying to manage the same file, are a common source of indexing problems. Start by visiting yoursite.com/sitemap.xml and yoursite.com/sitemap_index.xml in your browser. If either URL returns a structured XML file, a sitemap already exists.

Next, check which plugins are active. Yoast SEO, Rank Math, and All in One SEO all generate sitemaps automatically. If you have more than one of these installed and active, disable sitemap generation in all but one. Also confirm that your site is not set to discourage search engines under Settings > Reading in the WordPress dashboard. That single checkbox can block indexing regardless of how well your sitemap is configured.

Enable your XML sitemap in WordPress

WordPress has included a basic XML sitemap generator since version 5.5, so you may not need a plugin at all. To check whether it is active, navigate to Settings > Reading and look for the search engine visibility option. As long as that box is unchecked, WordPress generates a default sitemap accessible at yoursite.com/wp-sitemap.xml.

Using the WordPress core sitemap

The built-in sitemap covers posts, pages, categories, tags, and authors by default. It is a reasonable starting point for simple sites, but it offers no controls for excluding specific post types, noindex pages, or low-value URLs. If your site is straightforward and you want zero configuration, this is the fastest option.

Using an SEO plugin for sitemap control

For most WordPress sites, an SEO plugin gives you the control you need. Yoast SEO is the most widely used option. After installing and activating it, go to Yoast SEO > Settings > Site features and confirm that XML sitemaps are toggled on. Your sitemap index will appear at yoursite.com/sitemap_index.xml, with individual sitemaps for each content type listed beneath it.

Rank Math follows a similar pattern. Navigate to Rank Math > Sitemap Settings after activation, and you will find a dedicated panel for enabling and configuring your sitemap. Both plugins handle the technical formatting correctly and update the sitemap automatically whenever you publish or modify content.

Control what gets included in your sitemap

A smaller, cleaner sitemap performs better than one bloated with low-value URLs. The goal is to include every page you want indexed and exclude everything else. Common candidates for exclusion include tag archives, author pages, paginated archive pages, and any post type that exists for internal purposes rather than organic search.

Excluding content types in Yoast SEO

In Yoast SEO, go to Yoast SEO > Settings and open the content type you want to manage, such as Tags or Media. Toggle the option to include that type in the sitemap off. Yoast will also automatically exclude any page or post that has a noindex meta tag applied, which is the most reliable way to keep low-value URLs out of both the sitemap and the index simultaneously.

Excluding content types in Rank Math

In Rank Math, open Rank Math > Sitemap Settings and select the content type tab you want to configure. Each post type and taxonomy has its own include-or-exclude toggle. Rank Math also lets you exclude specific posts by ID, which is useful when you want to keep a post type in the sitemap generally but remove a handful of individual URLs.

Regardless of which plugin you use, avoid including URLs that return a redirect, a 404, or a noindex directive. These waste crawl budget and send mixed signals to search engines about the quality of your site.

Submit your sitemap to Google Search Console

Submitting your sitemap to Google Search Console tells Google exactly where to find it and gives you data on how many URLs have been discovered and indexed. This is a one-time action that takes under two minutes.

  1. Log in to Google Search Console and select your property.
  2. In the left menu, click Indexing, then select Sitemaps.
  3. In the field labeled Add a new sitemap, enter your sitemap URL. For Yoast SEO, this is typically sitemap_index.xml. For the WordPress core sitemap, use wp-sitemap.xml.
  4. Click Submit.

After submission, Google Search Console will display the sitemap status, the date it was last read, and the number of URLs discovered. It can take anywhere from a few hours to a few days for Google to process the sitemap fully. If the status shows an error rather than a success message, move on to the troubleshooting section below.

You should also submit your sitemap to Bing Webmaster Tools using the same process. Bing has its own index and its own crawl schedule, and direct submission speeds up discovery there as well.

Fix common WordPress sitemap problems

Most sitemap issues fall into a small number of categories. Identifying which one applies to your situation is usually faster than it looks.

Sitemap returns a 404 error

If your sitemap URL returns a 404, the most common cause is a permalink structure issue. Go to Settings > Permalinks in the WordPress dashboard and click Save Changes without making any modifications. This flushes the rewrite rules and often resolves the 404 immediately. If the problem persists, confirm that the plugin generating your sitemap is active and that no caching layer is serving a stale version of the URL.

Google Search Console reports a fetch error

A fetch error in Search Console usually means Googlebot cannot access the sitemap file. Check that your robots.txt file is not blocking the sitemap path. Visit yoursite.com/robots.txt and look for any Disallow rules that could be interfering. Most SEO plugins automatically add a Sitemap: directive to robots.txt pointing to the correct URL, which also helps Googlebot locate the file without manual submission.

URLs are missing from the sitemap

If specific posts or pages are not appearing in the sitemap, check two things. First, confirm the content type is enabled for inclusion in your plugin settings. Second, check the individual post or page for a noindex setting. In Yoast SEO, open the post, scroll to the Yoast meta box, and check the Advanced tab. If the robots meta is set to noindex, the page will be excluded from the sitemap automatically, which is the correct behavior.

Sitemap includes too many low-value URLs

If your sitemap contains paginated archives, empty tag pages, or URLs you never intended to surface in search, revisit your plugin’s content type settings and apply noindex to the relevant taxonomies or post types. A focused sitemap that reflects your actual content strategy will serve you better than one that includes every URL WordPress generates by default.

Once your sitemap is live, submitted, and returning clean data in Search Console, the foundation is in place. From here, the work shifts to publishing content worth indexing. If you are building out topic clusters and want to make sure every new article fits into a coherent site structure, our internal linking assistant and topical map tools inside WP SEO AI are designed to help you scale that process without losing architectural clarity.

Frequently Asked Questions

How often does my XML sitemap update automatically?

If you are using an SEO plugin like Yoast SEO or Rank Math, your sitemap updates automatically every time you publish, update, or delete content — no manual action required. The WordPress core sitemap (wp-sitemap.xml) behaves the same way. You do not need to resubmit your sitemap to Google Search Console after each update; once submitted, Google will re-crawl it on its own schedule based on your site's crawl frequency.

Do I need to resubmit my sitemap to Google Search Console every time I add new content?

No, resubmission is not necessary after every new post or page. Submitting your sitemap once is enough to register it with Google. After that, Googlebot will revisit the sitemap periodically based on how frequently your site publishes new content. However, if you switch SEO plugins or change your sitemap URL for any reason, you should submit the new URL in Search Console and remove the outdated one.

What is the difference between a sitemap index file and a regular sitemap file?

A sitemap index file (such as sitemap_index.xml) is essentially a table of contents that points to multiple individual sitemap files, each covering a specific content type like posts, pages, or categories. A regular sitemap file contains the actual list of URLs. SEO plugins like Yoast SEO and Rank Math generate a sitemap index by default because it keeps large sites organized and stays within the 50,000 URL limit that applies to individual sitemap files.

My sitemap is live and submitted, but many URLs still show as 'Discovered – currently not indexed' in Search Console. What should I do?

This status means Google has found the URLs but has not yet chosen to index them, which is a crawl prioritization decision rather than a sitemap problem. To improve your chances of indexing, focus on strengthening internal links to those pages, improving content quality and depth, and ensuring those URLs are not accidentally set to noindex. For brand new or low-authority sites, this process can take several weeks, and consistently publishing high-quality content is the most reliable way to accelerate it.

Should I include image and video URLs in my WordPress sitemap?

Yes, if visual content is a meaningful part of your SEO strategy. Yoast SEO supports image sitemaps natively and embeds image data within your existing sitemap entries, helping Google discover and index images for Google Images search. For video content, a dedicated video sitemap provides additional metadata like thumbnail URLs, titles, and descriptions that standard sitemaps do not support. If images or videos are not a traffic priority for your site, the standard sitemap configuration is sufficient.

Can having too many URLs in my sitemap actually hurt my SEO?

Not directly, but an oversized sitemap filled with low-quality, duplicate, or redirected URLs can waste your site's crawl budget, meaning Googlebot spends time on pages that add no value instead of prioritizing your best content. The practical fix is to exclude content types that are not meant for organic search — such as tag archives, author pages, and paginated URLs — using your SEO plugin's settings. A leaner sitemap that accurately reflects your indexable content is always preferable to an exhaustive one.

What happens to my sitemap if I switch from one SEO plugin to another?

When you deactivate your current SEO plugin, its sitemap URL will stop working, which means the URL you previously submitted to Google Search Console will return a 404 until the new plugin is active and generating its own sitemap. To handle this cleanly, install and configure the new plugin first, verify the new sitemap URL is accessible, then deactivate the old plugin. Finally, submit the new sitemap URL in Google Search Console and delete the old one from your sitemap list to avoid confusion.

Related Articles