SEO & Analytics

How to Create Sitemap in WordPress

SEO and analytics for WordPress

A sitemap is a special file that lists the important URLs on your WordPress site so search engines can discover, crawl, and index them more reliably. If you do not have a sitemap, new posts and pages can take longer to appear in search results — or be missed entirely.

In this guide, you will learn how to create a WordPress sitemap using the built-in core feature and popular SEO plugins like Yoast. You will also see how to submit your sitemap to Google Search Console and how to keep it healthy over time.

If you are brand new to optimization, it also helps to see where sitemaps fit in your wider SEO strategy. After this tutorial, you can dive deeper with our complete beginner’s guide to WordPress SEO to connect all the pieces.

Prerequisites

Before you create a sitemap, make sure the basics are in place so the process is smooth and errors are easy to troubleshoot.

  • Administrator access to your WordPress dashboard.
  • A relatively up-to-date WordPress version (5.5 or higher is ideal for core sitemaps).
  • Permission to install and configure plugins (Yoast SEO, Rank Math, etc.), if you plan to use a plugin-based sitemap.
  • Access to your Google account and Google Search Console (or the ability to create one).
Note: Your sitemap setup is theme-agnostic. Whether you use the Jannah theme, Classic Editor, or the Block Editor, the steps below all happen in the WordPress admin sidebar, not inside your content editor.

Step 1: Know Your WordPress Sitemap Options

WordPress can generate a sitemap in a few different ways. Understanding your options helps you avoid duplicate sitemaps and pick the one that works best for your site.

Typically, you will use one of these approaches:

  • WordPress core sitemap: WordPress 5.5+ automatically creates a sitemap at /wp-sitemap.xml as long as it is not disabled by code or a plugin.
  • SEO plugin sitemap: Plugins such as Yoast SEO, All in One SEO, and Rank Math include powerful XML sitemap modules (usually at URLs like /sitemap_index.xml).
  • Standalone sitemap plugin: Tools like “XML Sitemaps” focus only on generating sitemaps, with fewer extra SEO features.
Warning: Running multiple sitemap systems at once (for example, core + Yoast + a standalone sitemap plugin) can create confusion for search engines. In most cases, you should pick one sitemap solution and stick with it.

Step 2: Enable the Default WordPress Sitemap

If your site runs on a reasonably recent WordPress version and no plugin has disabled core sitemaps, you may already have a working sitemap.

  1. Log in to your WordPress dashboard as an administrator.
  2. Go to Settings → Reading.
  3. Scroll down and confirm that “Search engine visibility” is unchecked. If this box is checked, WordPress tells search engines not to index your site.
  4. In a new browser tab, visit https://yourdomain.com/wp-sitemap.xml (replace yourdomain.com with your real domain).

You should see a simple XML page that lists sitemap indexes for posts, pages, and other content types. That means the core sitemap feature is working.

Note: If you see a 404 error or a blank page at /wp-sitemap.xml, visit Settings → Permalinks and click Save Changes once to flush rewrite rules. If that does not help, a plugin may be disabling the core sitemap, and you can switch to a plugin-based solution instead.

Step 3: Create a Sitemap with an SEO Plugin

Most WordPress sites use an SEO plugin to control titles, meta descriptions, and sitemaps at the same time. Here we will use Yoast SEO as an example, but the process is similar for other plugins.

  1. Install and activate Yoast SEO:
    1. Go to Plugins → Add New in your dashboard.
    2. Search for “Yoast SEO”.
    3. Click Install Now, then Activate.
  2. In the left-hand sidebar, click SEO → General, then open the Features tab.
  3. Find the XML sitemaps feature and make sure it is set to On.
  4. Click the small question mark icon next to “XML sitemaps” and use the link labeled “See the XML sitemap” to open it in a new tab.
  5. Confirm that the URL (often /sitemap_index.xml) loads correctly and lists your sitemap indexes.
Yoast SEO settings for WordPress sitemaps, showing how to enable and view your XML sitemap for improved SEO.
Screenshot of the Yoast SEO plugin settings in WordPress, highlighting the XML sitemap feature.
Pro Tip: After enabling the Yoast sitemap, you can safely ignore the core /wp-sitemap.xml file. Yoast automatically handles your content types and is usually easier to control. For a complete configuration walkthrough, check our Yoast SEO setup guide once the sitemap itself is working.

If you prefer a different SEO plugin (such as Rank Math or All in One SEO), look for a similar “Sitemap” or “XML Sitemaps” setting. The key steps are the same: enable the feature, open the sitemap URL, and confirm it loads without errors.

Step 4: Submit Your Sitemap to Google Search Console

Creating a sitemap is only the first half of the job. You also want to tell Google exactly where your sitemap lives so it can be crawled and monitored for errors.

  1. Open Google Search Console in your browser and log in with your Google account.
  2. Select the correct property for your site (for example, the domain property covering yourdomain.com).
  3. In the left-hand menu, click Sitemaps.
  4. Under “Add a new sitemap”, type only the path part of your sitemap URL:
    • If you use the core sitemap, enter wp-sitemap.xml.
    • If you use Yoast or another plugin, enter sitemap_index.xml (or whatever path the plugin shows).
  5. Click Submit and wait for Google to process the sitemap. You should see a status such as “Success” once it has been fetched.
Google Search Console Sitemaps page showing where to submit a new sitemap and a successfully submitted sitemap for a WordPress site.
The Google Search Console Sitemaps page, demonstrating how to add a new sitemap and showing the status of previously submitted sitemaps.

If you have not connected your site to Search Console yet, follow our guide to adding Google Search Console to WordPress first, then return here to submit your sitemap.

Note: You only need to submit the main sitemap index (for example, sitemap_index.xml). Google will discover all the child sitemaps (posts, pages, categories, etc.) automatically.

Step 5: Test and Maintain Your Sitemap

Once your sitemap is live and submitted, you need to keep an eye on it, especially when you change themes, install new plugins, or add custom post types.

Check sitemap coverage in Search Console

  1. In Google Search Console, open the Sitemaps page again.
  2. Click your sitemap in the list to see more details.
  3. Review the “Discovered URLs” chart and the Index coverage report to confirm that key pages are being indexed.

If you notice that important URLs are excluded or you see many “Submitted URL marked ‘noindex’” warnings, check your SEO plugin settings and any per-page “noindex” options.

Keep your sitemap clean

  • Exclude thin content such as tag archives or low-value attachment pages if they do not help users.
  • Exclude private or membership-only pages that should not appear in search results.
  • Remove test content and draft-like pages from the sitemap by setting them to noindex when appropriate.
Warning: A sitemap can expose URLs that users would not normally find via navigation. Be sure you are not including sensitive pages (such as temporary landing pages, admin-like URLs, or private customer dashboards) in your sitemap.

Check robots.txt for sitemap references (optional)

If you manage your robots.txt file manually or via an SEO plugin, you can add a direct reference to your sitemap so crawlers discover it faster.

Sitemap: https://yourdomain.com/sitemap_index.xml

Replace yourdomain.com and the path to match your actual sitemap URL. Run a quick test by visiting https://yourdomain.com/robots.txt in your browser to confirm the line is present.

[h tie_index]Conclusion[/tie_index]

Turn Your WordPress Sitemap into an SEO Asset

At this point, you have chosen a sitemap method (core or plugin), confirmed that the XML file loads correctly, and submitted it to Google Search Console. Your new content should now be discovered faster, and crawling issues will be easier to spot.

Remember that a sitemap is not a ranking trick; it is an indexing tool. Combine a clean, accurate sitemap with solid on-page optimization, internal linking, and fast performance, and you give your WordPress site the best chance to perform well in search results.

Set a recurring reminder to check your sitemap and index coverage after major site changes, and you will stay ahead of most technical SEO problems before they impact your traffic.

Further Reading

Frequently Asked Questions

Do I need a plugin to create a WordPress sitemap?

No, you do not always need a plugin for a sitemap. WordPress 5.5 and higher can generate a basic sitemap at /wp-sitemap.xml automatically. However, many site owners prefer to use an SEO plugin because it gives more control over which content types are included, lets you exclude low-value pages, and combines sitemap management with titles, meta descriptions, and other SEO settings in one place.

Why can’t I see my WordPress sitemap when I visit the URL?

If you get a 404 error or a blank page at your sitemap URL, flush your permalinks by visiting Settings → Permalinks and clicking Save Changes. Next, check whether another plugin has disabled the core sitemap or is trying to serve its own sitemap at the same path. Temporarily deactivate SEO and sitemap-related plugins one by one to see which one controls the sitemap output.

My sitemap shows errors in Google Search Console. What should I do?

Start by opening the sitemap directly in your browser to confirm it loads and lists valid XML. Then review the exact error message in Search Console (for example, “Submitted URL marked ‘noindex’” or “Couldn’t fetch”). Fix any plugin misconfigurations, remove URLs that should not be indexed, and resubmit the sitemap. Many issues clear automatically once the underlying problem (such as a 404 page or redirect loop) has been fixed.

Can a sitemap leak private or sensitive information?

A sitemap can reveal URLs that are not linked anywhere else on your site, so it is important to exclude any pages that should not be discoverable in search. That includes private member dashboards, internal-only landing pages, or temporary test URLs. Use your SEO plugin’s options to mark these as noindex and remove them from the sitemap, and avoid publishing truly sensitive content in publicly accessible locations.

How often should I update or resubmit my sitemap?

Most of the time, you do not need to resubmit your sitemap manually. WordPress and your SEO plugin update it automatically as you publish or remove content, and Google will recrawl it periodically. Resubmission is useful after major changes such as migrating your site, changing your URL structure, switching SEO plugins, or fixing large numbers of crawl errors reported in Search Console.

Related Articles

Leave a Reply

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

Back to top button