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

When I review new WordPress websites, one of the most common issues I see is pages not getting indexed properly. The site looks fine, the content is there, but Google hasn’t picked up everything yet — or sometimes hasn’t picked up anything at all.

In most cases, the problem isn’t the content. It’s that Google doesn’t have a clear map of the site. That’s where an XML sitemap comes in. If you’re still setting up your site, it also helps to follow a proper basic SEO setup for a new WordPress website so everything works together from the start.

If your site is new, recently restructured, or still growing, a sitemap helps search engines discover your pages faster and understand how your content is organized.

Quick Answer / Summary

An XML sitemap is a file that lists your website’s important pages so search engines can find and index them.

To create and submit one in WordPress:

  1. Use an SEO plugin (like Rank Math or Yoast) to generate the sitemap automatically
  2. Find your sitemap URL (usually /sitemap_index.xml)
  3. Submit it in Google Search Console

Once submitted, Google will use it to crawl and index your site more efficiently.

Why This Matters

Without a sitemap, Google can still find your pages — but it relies on links to do so. That works well for established sites, but not always for new ones.

In my experience, sites without a sitemap often have:

  • Pages that take longer to appear in search results
  • Important pages that never get indexed
  • Weak visibility early on

A sitemap doesn’t guarantee rankings, but it removes a major obstacle: discoverability.

It also becomes more important as your site grows. The more pages you have, the more useful a structured sitemap becomes.

Step-by-Step Instructions

Step 1: Install an SEO Plugin

The easiest way to create a sitemap in WordPress is with an SEO plugin.

If you already followed your site setup properly, you likely have one installed. If not:

  • Install Rank Math or Yoast SEO
  • Activate the plugin

Both will automatically generate a sitemap — you don’t need to build one manually.

In most sites I build, I use Rank Math because it gives more control out of the box, but either works fine for this.


Step 2: Enable the Sitemap Feature

For Rank Math:

  • Go to Rank Math → Sitemap Settings
  • Make sure “Sitemaps” is enabled

For Yoast:

  • Go to SEO → General → Features
  • Ensure “XML sitemaps” is turned on

Once enabled, WordPress will generate your sitemap automatically.


Step 3: Find Your Sitemap URL

Your sitemap is usually available at:

https://yourdomain.com/sitemap_index.xml

You can also find it inside your plugin settings.

When you open it in your browser, you’ll see a structured list of:

  • Posts
  • Pages
  • Categories (if enabled)

This is what Google uses to understand your site.


Step 4: Submit Your Sitemap in Google Search Console

Now you need to tell Google where it is. If you want to understand how Google processes sitemaps, you can also review the official Google sitemap documentation.

  1. Open Google Search Console
  2. Select your website property
  3. Go to Sitemaps (left-hand menu)
  4. Enter:
    sitemap_index.xml
  5. Click Submit

That’s it.

Once submitted, Google will start processing it and crawling your pages.


Step 5: Check Status and Coverage

After submission:

  • Check if the sitemap is “Success”
  • Monitor how many URLs are discovered and indexed

This gives you a quick view of whether your content is being picked up properly.

Practical Tips and Observations

  • Keep it automatic
    You don’t need to manually update your sitemap. The plugin updates it whenever you add or remove content.
  • Exclude low-value pages
    In most setups, I exclude things like:
    • Tag pages (unless used properly)
    • Author archives (for single-author sites)
  • Focus on important content only
    Your sitemap should include pages you actually want indexed.
  • Use it early
    I usually submit the sitemap right after launching a site. It helps Google pick things up faster.

Common Mistakes

1. Submitting the Wrong URL

Some people submit:

  • /sitemap.xml
  • /post-sitemap.xml

These can work, but the correct main file is usually:

  • /sitemap_index.xml

That file links to all other sitemaps.


2. Including Everything by Default

Not everything should be indexed.

Including unnecessary pages (like thin archives) can:

  • Waste crawl budget
  • Reduce overall SEO quality

3. Forgetting to Submit the Sitemap

Creating a sitemap isn’t enough — Google still needs to know about it.

I often see sites with a sitemap generated but never submitted.


4. Ignoring Indexing Issues

Submitting a sitemap doesn’t mean everything will be indexed.

If pages aren’t showing up:

  • Check for “noindex” settings
  • Review content quality
  • Look for crawl errors in Search Console

When to Use This vs Alternatives

Best for:

  • Most WordPress websites
  • Beginners and intermediate users
  • Sites that change regularly

This is the standard approach.


Manual Sitemap (Rare Cases)

Only useful if:

  • You’re building a highly custom setup
  • You want full control over every URL

For most sites, this is unnecessary.


Technically possible, but:

  • Slower indexing
  • Less control
  • Not ideal for new sites

I don’t recommend skipping it.

Conclusion

An XML sitemap is one of the simplest ways to improve how search engines discover your site.

Set it up once, submit it in Search Console, and let it run in the background. It won’t directly improve rankings, but it removes a key barrier: making sure your pages are actually seen.

On most WordPress sites I work on, this is part of the basic setup — and it’s something worth getting right early.