how to create a sitemap for wordpress

How to Create Sitemap in WordPress

If you’re serious about SEO — and you should be — then learning how to create a sitemap in WordPress is a must. I’m Cian Murphy, and almost two decades in SEO, I can tell you: sitemaps are one of those “quick wins” people ignore. But search engines don’t ignore them. It actually recommends having one if your site is large or has lots of archived content.

I help companies in Ireland with their SEO efforts. In this post, I’ll walk you through exactly how to create a sitemap in WordPress, why it matters, and which plugins I trust to do the job right.

Why Sitemaps Matter for SEO

A sitemap is like a contents page for your website. It tells search engines where everything lives. No guesswork. No missing pages. It’s especially handy if your site isn’t linked together well internally, or if you’ve just launched and don’t have many backlinks yet.

According to Google Search Central, sitemaps help their bots crawl sites more intelligently. You’re giving them a structured list of URLs, telling them what to index and how frequently content changes.

Here’s what that means for your WordPress site:

  • Better indexing of new pages
  • Faster discovery of updated content
  • Higher chances of ranking for more keywords

And if you’re running an eCommerce site or blog with categories, tags, and products scattered everywhere? A sitemap becomes even more essential.

The Difference Between XML and HTML Sitemaps

sitemap example

There are two main types of sitemaps people mix up:

XML Sitemaps – These are made for search engines. You won’t see them unless you go looking. They’re written in code and structured data — the kind Googlebot loves. Here’s an example of mine – https://cianmurphy.ie/sitemap_index.xml

HTML Sitemaps – These are for your human visitors. Think of them like a full-page directory of your site.

For SEO purposes, we’re focusing on XML sitemaps here. That’s what you’ll submit to Google Search Console and Bing Webmaster Tools.

How WordPress Handles Sitemaps by Default

As of version 5.5, WordPress now generates a basic XML sitemap automatically. You can see it by going to:

yoursite.com/wp-sitemap.xml

Handy, right? But this default sitemap is pretty bare-bones. It doesn’t give you much control, and it can miss out on:

  • WooCommerce products
  • Custom post types
  • Noindex pages
  • Excluded categories or tags

So while it’s good to know it’s there, I’d always recommend using a plugin to take more control.

Best Plugins to Create a Sitemap in WordPress

Here are the top tools I use and recommend:

Yoast SEO Sitemaps

Still the most popular SEO plugin for WordPress. Yoast automatically generates an XML sitemap and updates it every time you publish or update content.

To view it: yourdomain.com/sitemap_index.xml

How to enable in Yoast:

  • Go to SEO > General > Features tab
  • Toggle “XML sitemaps” to On

You can even filter what gets included — exclude tags, media pages, or specific post types if needed.

Rank Math Sitemaps

Rank Math has exploded in popularity lately, and rightly so. Its sitemap feature is more advanced out of the box than Yoast’s.

What I like about Rank Math:

  • Modular approach – turn sitemap settings on/off
  • Works well with WooCommerce and custom post types
  • Easier control over image sitemaps

How To set it up Rankmath Sitemaps:

  • Go to Rank Math > Sitemap Settings
  • Toggle individual sitemap types (Posts, Pages, Products etc.)
  • Customise frequency, priority, and exclusions

Google XML Sitemaps

This one’s old school. It doesn’t touch any SEO settings like Yoast or Rank Math, but it’s super lightweight. If you don’t need all the extras, this could be your best bet.

Pros of Google XML Sitemaps:

  • Simple setup
  • No bloat
  • Still updated regularly

Just install and activate.

The sitemap is live at –

yourdomain.com/sitemap.xml

Step-by-Step: Creating and Submitting Your Sitemap

search console submissions google

Let’s walk through how to actually get your sitemap in front of search engines.

Step 1: Install Your SEO Plugin

Pick one from the list above. My go-to is Rank Math for newer sites and Yoast for established ones that already use it.

Step 2: Check the Sitemap URL

Once installed, go to yourdomain.com/sitemap_index.xml (Yoast or Rank Math) and check that it loads correctly. You should see a clean breakdown of pages, posts, and other content types.

Step 3: Submit to Google Search Console

  • Go to Google Search Console
  • Select your property (website)
  • Click Sitemaps in the left menu
  • Enter the sitemap URL (just the tail end e.g. sitemap_index.xml)
  • Click Submit

You’ll see a status update once it’s processed. If there are errors, fix them and resubmit.

Step 4: Submit to Bing Webmaster Tools

With Bing you can just import your Google Search Console set up or you could just follow the same process here:

  • Log into Bing Webmaster Tools
  • Select your site > Configure My Site > Sitemaps
  • Add the URL and submit

Step 5: Check Your Robots.txt File

Sitemap in robots.txt

This is an extra step most people miss. Your sitemap should be listed in your robots.txt file so crawlers can find it easily.

To check it:

Visit yourdomain.com/robots.txt

Look for a line like:

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

If it’s missing, your plugin may not have added it. You can edit robots.txt manually using a file manager or plugin like WP File Manager. Yoast and Rankmath should auto-add this feature.

What to Avoid with WordPress Sitemaps

Let’s quickly cover a few traps I’ve seen over the years:

  • Don’t submit both the default WordPress and plugin-generated sitemap. Pick one.
  • Avoid including noindex pages – like thank you pages or admin-only areas.
  • Keep your sitemap clean. Pages that return 404s or redirects can get your sitemap flagged in GSC.
  • Update regularly. Your plugin should do this for you automatically, but always double-check if you’ve made big site changes.

Should You Use HTML Sitemaps Too?

Honestly? Only if you run a large blog or content-heavy site. HTML sitemaps are more for user navigation than SEO, and they can help older users find what they’re looking for if your menus are cluttered. That’s just my opinion on it.

Plugins like Simple Sitemap let you build a basic HTML one with shortcode.

But if you’re just getting started, focus on your XML sitemap first.

If you ever wanted to be impressed by a HTML sitemap you should checkout the New York Times version. They have content going back to 1851 on their site.

My Summary on Sitemaps

Creating a sitemap in WordPress is one of those tasks that feels a bit boring, but it’s genuinely powerful for SEO. It helps search engines find your content faster, understand your site’s structure, and index your pages more efficiently.

If you’re not using one — or relying on the default WordPress version — you’re probably leaving visibility on the table.

I’d recommend setting it up today. It only takes 10 minutes, and it can make a noticeable difference in how your content gets picked up.

get help with your sitemap
Unlock your site's potential with a FREE Consultation
This is default text for notification bar