Guide

How to Create an XML Sitemap in WordPress (2026)

Create and submit an XML sitemap for WordPress. Learn to use Yoast SEO or Rank Math, submit to Google Search Console, and keep your sitemap optimized.

How to Create an XML Sitemap in WordPress

An XML sitemap lists all the important URLs on your site in a format search engines can read. Submitting it to Google helps ensure all your content is discovered and indexed promptly.

WordPress Built-in Sitemaps

WordPress 5.5+ includes a basic sitemap at yoursite.com/wp-sitemap.xml. It lists posts, pages, categories, and authors. For most sites, this is a reasonable starting point — but SEO plugins offer more control.

Sitemap with Yoast SEO

  1. Install and activate Yoast SEO
  2. Go to Yoast SEO → Features and ensure XML Sitemaps is enabled
  3. Click the question mark icon next to XML Sitemaps, then "See the XML sitemap" to view it
  4. Your sitemap is at yoursite.com/sitemap_index.xml

To exclude specific post types or taxonomies: go to Yoast → Search Appearance and set unwanted types to "noindex."

Sitemap with Rank Math

Rank Math generates sitemaps automatically. Find it at yoursite.com/sitemap_index.xml. Configure which post types and taxonomies are included under Rank Math → Sitemap Settings.

Submit to Google Search Console

  1. Go to search.google.com/search-console
  2. Select your property (add and verify your domain if not done)
  3. In the left sidebar, click Sitemaps
  4. Enter your sitemap URL (e.g., sitemap_index.xml) and click Submit

Google will show the sitemap status, number of URLs submitted, and any errors.

Sitemap Best Practices

  • Exclude thin or duplicate content (tag archives, author pages for single-author blogs)
  • Prioritize high-value content pages
  • Update your sitemap automatically — both Yoast and Rank Math do this on publish
  • Check for crawl errors in Search Console monthly

Start building with SiteICO

Deploy your WordPress site in under 1 second. Follow our guides to get the most out of the platform.

No credit card required.