WordPress XML Sitemap: How to Create One and Submit It to Google Search Console

Muhammad Arslan Aslam | January 20, 2026

Create an XML sitemap in WordPress with Yoast or Rank Math, submit it to Google Search Console, and fix common issues that block indexing.

Google can crawl your site without a sitemap. Most site owners hear that and treat sitemaps as optional. That’s where basic SEO setups quietly fall apart.

A WordPress XML sitemap works like a URL inventory. It tells Google, “These are the URLs on my site that I consider real.” Without one, Google still discovers some pages via internal links, menus, and backlinks—but discovery gets messy fast once you add blog categories, landing pages, pagination, WooCommerce filters, or a pile of redirects.

This guide stays practical:

  • create sitemap WordPress using Yoast or Rank Math
  • submit sitemap Google WordPress using Google Search Console
  • validate that your sitemap lists the right URLs (and doesn’t leak the wrong ones)

What a WordPress SEO sitemap should include (simple rules that prevent big mistakes)

Before you touch plugin settings, decide what deserves a place in your WordPress SEO sitemap.

Include:

  • pages you actually want people landing on (services, contact, pricing, core landing pages)
  • blog posts you want discovered
  • WooCommerce product URLs (if you sell)
  • category pages only when they act like real hubs, not empty archives

Exclude:

  • internal search URLs (/?s=...)
  • tag archives you don’t curate
  • attachment pages (thin content almost all the time)
  • filter/sort parameter URLs (?color=..., ?sort=..., ?utm_source=...) unless you deliberately manage faceted SEO

Rule you can follow without overthinking: if you wouldn’t want that URL showing up in Google, don’t list it in the sitemap.

Pick one sitemap source (don’t run multiple generators)

You usually have three sitemap sources:

  • WordPress core sitemap: https://example.com/wp-sitemap.xml
  • Yoast sitemap index: https://example.com/sitemap_index.xml
  • Rank Math sitemap index: https://example.com/sitemap_index.xml

If you use Yoast or Rank Math, let one plugin own the sitemap.

Multiple sitemap generators don’t create “more coverage.” They create conflicting inventories. Google sees mixed signals, and you get noisy Search Console data.

Yoast sitemap: how to create it and control what’s inside

People search “Yoast sitemap,” see the URL, and stop.

Don’t. You need two checks: the URL must load cleanly, and it must include only the content types you actually want indexed.

1) Find your Yoast sitemap URL

In most installs:

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

Open it in a private/incognito window.

You want:

  • a fast-loading XML page
  • HTTP 200 (no errors)

If it redirects once (like httphttps), that’s usually fine. If it chains redirects or 404s, fix it before you submit anything.

2) Enable XML sitemaps in Yoast

Go to:

  • Yoast SEO → Settings → Site features → XML sitemaps → On

Yoast creates a sitemap index (a sitemap that links to multiple smaller sitemaps). That’s normal and good.

3) Choose what Yoast includes

Go to:

  • Yoast SEO → Settings → Content types
  • Yoast SEO → Settings → Categories & tags

Good default decisions for first-time setups:

  • turn off attachment URL indexing (or redirect attachments)
  • turn off author archives unless you publish with multiple real authors
  • keep tags out unless you actively curate them

This is where most sitemap “problems” come from. The sitemap generator usually works. The inclusion rules usually don’t.

4) Clear cache after changes (simple version)

If you run a caching plugin, purge cache after changing sitemap settings.

If your host provides caching (common on managed hosting), use their dashboard to purge cache.

That’s enough for most sites.

Rank Math sitemap: how to create it and keep it clean

Rank Math works well when you have custom post types (courses, listings, resources) because it gives you granular control.

1) Find your Rank Math sitemap URL

Typical:

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

2) Enable sitemaps in Rank Math

Go to:

  • Rank Math → Sitemap Settings

Enable:

  • Sitemaps
  • Images in Sitemaps (useful if images matter for discovery)

3) Choose what Rank Math includes

Review:

  • post types
  • taxonomies
  • author sitemap

Keep it tight. A smaller sitemap full of pages you actually want indexed beats a giant sitemap full of defaults.

Submit sitemap to Google Search Console (exact steps)

This is the plain-English “submit sitemap Google WordPress” workflow.

Step 1: Verify your site in Google Search Console

Use a Domain property if possible. It covers all variants (www, non-www, http/https, subdomains).

DNS verification also survives theme and plugin changes.

Step 2: Submit the sitemap

In Google Search Console:

  • open Sitemaps
  • under Add a new sitemap, enter sitemap_index.xml (or your exact sitemap path)
  • click Submit

Step 3: Understand what “Success” really means

GSC will show:

  • Success / Couldn’t fetch / Has errors
  • counts like Discovered URLs

Two translations you need:

  • Discovered means Google saw the URL in your sitemap.
  • Indexed means Google accepted it into the index.

A sitemap can submit successfully and still produce poor indexing if you listed duplicates, thin pages, noindex pages, or pages where the canonical points somewhere else.

Validate in 10 minutes (so you don’t trust a checkbox)

Do these checks right after submission.

Check A: the sitemap returns HTTP 200

Open the sitemap URL and confirm it loads consistently.

If you want a no-fuss technical check, use an online HTTP status checker.

If you’re comfortable with basic command line, this works too:

  • curl -I https://yourdomain.com/sitemap_index.xml

Check B: sample 5 URLs from the sitemap

Pick a few pages you care about.

Confirm:

  • the page loads (HTTP 200)
  • it doesn’t redirect somewhere unexpected
  • the canonical tag points to itself (for most normal pages)

Check C: use GSC “URL Inspection” for one key page

Inspect a page you want indexed.

If GSC shows “Crawled — currently not indexed” or “Discovered — currently not indexed,” don’t panic. Treat it as a prompt to review:

  • content quality and uniqueness
  • internal links pointing to that page
  • accidental noindex
  • canonical URL mismatches

Common WordPress sitemap issues (fixes you can do without developer skills)

Across routine WordPress maintenance and SEO cleanup work, the same problems repeat.

1) Your sitemap URL shows 404

Fix this order:

  1. Re-save permalinks: Settings → Permalinks → Save Changes (flushes rewrite rules)
  2. Disable other SEO plugins (only one sitemap generator)
  3. Check security plugins that block XML endpoints

If you use custom rules, review .htaccess hardening snippets. Some blocks accidentally target XML endpoints.

2) Google Search Console says “Couldn’t fetch”

If the sitemap loads in your browser but Google can’t fetch it, suspect blocking:

  • robots.txt blocks
  • CDN/WAF rules blocking Googlebot
  • basic auth on the site (common on staging)
  • IP deny rules

This sits at the boundary between hosting and WordPress. Don’t “SEO” your way out of an access problem.

3) The sitemap includes pages you set to noindex

This happens when you:

  • mark something noindex
  • but still include it in sitemap settings

Align settings. Then purge cache.

4) Deleted pages still appear in the sitemap

Caching usually causes this.

Clear:

  • plugin cache
  • host cache

Then re-check the sitemap.

5) The sitemap includes tag pages, filters, or tracking parameters

Don’t fight symptoms. Fix the source:

  • set tags to noindex (or remove them from the sitemap)
  • keep internal search out of the index
  • keep filter/sort URLs out unless you manage faceted SEO deliberately

This prevents duplicate content and crawl waste.

6) The sitemap “works,” but it’s slow or inconsistent

If loading sitemap_index.xml sometimes times out or returns a 5xx, treat it as a real site issue.

Common causes:

  • low PHP memory limit
  • a plugin conflict
  • a huge number of URLs (especially on WooCommerce with lots of variations)

At that point, you’ve moved from “basic SEO setup” into “site operations.”

Optional advanced checks (only if you already have a dev/helper)

You don’t need this for a first-time setup. Use it when something clearly breaks and basic troubleshooting doesn’t help.

  • Object cache: some hosts use Redis/Memcached. Cached XML can stick around. Ask hosting support to “flush object cache.”
  • Transients: WordPress plugins store temporary cached data as transients. Stale transients can keep old sitemap output around.
  • wp_options: if wp_options autoload gets bloated, lots of requests slow down—sometimes including sitemap generation.
  • Cron jobs: if scheduled tasks stall, plugins can fail to regenerate sitemap components. If you have command-line access, WP-CLI can test it: wp cron event run --due-now.

If that list reads like another language, ignore it. Stick to the basic steps above and escalate only when you see errors in GSC.

Where sitemaps stop being “SEO setup” and become maintenance

Sitemaps sit at the intersection of:

  • plugin updates (Yoast/Rank Math behavior changes over time)
  • caching (page cache + object cache)
  • rewrite rules and redirects

So yes—an update can break your sitemap.

If you want the broader system view (backups, updates, monitoring, indexing hygiene), use this: WordPress maintenance checklist.

If you want this handled without guessing

You can do a clean sitemap setup yourself. You just need a repeatable process and the discipline to re-check it after updates.

If you want professionals handling the maintenance layer that keeps sitemap and indexing signals stable, start here: Vimsy WordPress services.

We publish plan costs openly here: Vimsy pricing.

If you want a quick sanity check and a clear plan, book a free call: contact Vimsy.

Look — I’m writing this because this is a problem I see constantly, and it’s also exactly what we built Vimsy to solve. If you want professionals handling this instead of hoping nothing breaks, book a free call.

Commercial acknowledgment: Vimsy provides ongoing WordPress maintenance, performance tuning, and technical SEO support for site owners who want stable crawling and fewer indexing surprises.


Related Posts

WordPress Site Down? Here's Your Step-by-Step Outage Response Plan

WordPress Site Down? Here's Your Step-by-Step Outage Response Plan

When your WordPress site goes down, every minute costs real money. This emergency response guide covers diagnostic steps, escalation thresholds, and how to recover fast.
Muhammad Arslan Aslam | February 22
The WordPress Memory Limit Fix Everyone Gets Half Right

The WordPress Memory Limit Fix Everyone Gets Half Right

Increasing WordPress PHP memory takes 30 seconds. But if you don't know why it's exhausted, you're just resetting a timer. Here's the full diagnostic.
Muhammad Arslan Aslam | February 22
WordPress Traffic Spikes: How to Make Sure Your Site Doesn't Crash When It Goes Viral

WordPress Traffic Spikes: How to Make Sure Your Site Doesn't Crash When It Goes Viral

A traffic spike shouldn't end in a crash. Learn how to harden your WordPress stack with caching, CDN config, load testing, and scaling strategy before launch day.
Muhammad Arslan Aslam | February 21

Subscribe to Our Newsletter

Get the latest WordPress tips, security updates, and maintenance insights delivered to your inbox.

We respect your privacy. Unsubscribe at any time.