How to Create an XML Sitemap in WordPress

An XML sitemap tells search engines which pages and posts exist on your site, helping them crawl and index your content more efficiently. dotCanada recommends generating and submitting a sitemap as a foundational SEO step for any new WordPress site.

Option 1: Use Yoast SEO (Recommended)

Yoast SEO automatically generates an XML sitemap when installed and activated. No additional configuration is needed.

  1. Install and activate Yoast SEO from Plugins > Add New.
  2. Your sitemap is available immediately at https://yourdomain.com/sitemap.xml.
  3. The sitemap index links to separate sitemaps for posts, pages, categories, and other content types.

Option 2: Use Rank Math

Rank Math also generates a sitemap automatically. Go to Rank Math > Sitemap Settings to control which content types are included.

Option 3: WordPress Core Sitemap

Since WordPress 5.5, a basic sitemap is built in and accessible at yourdomain.com/wp-sitemap.xml. It does not offer the customization of dedicated SEO plugins but works without any additional software.

Submitting Your Sitemap to Google

  1. Log in to Google Search Console and select your property.
  2. Go to Sitemaps in the left menu.
  3. Enter your sitemap URL (e.g. sitemap.xml) and click Submit.

Google will begin crawling your sitemap and indexing your pages. If your sitemap is not found or returns an error, contact our support team for help.

100% Satisfaction Guarantee

We're so confident you'll love dotCanada that we offer a 30-day money-back guarantee. Not satisfied? Get a full refund, no questions asked.

Ready to Get Started?

Join thousands of Canadian website owners who trust dotCanada for reliable, fast web hosting.

Get Started Today