Skip to content

How to Create Sitemap in WordPress

Creating a sitemap in WordPress helps search engines like Google discover and index your content efficiently. This guide walks you through simple methods using popular plugins and manual techniques, so you can improve your site’s visibility without technical hassle.

Key Takeaways

  • Use SEO plugins: Tools like Yoast SEO or Rank Math automatically generate and update your sitemap with no coding needed.
  • Manual sitemap creation: You can create a basic XML sitemap manually using a text editor and upload it via FTP, though it’s less efficient.
  • Submit to Google Search Console: After generating your sitemap, submit it to Google to speed up indexing and monitor crawl errors.
  • Keep it updated: Regularly refresh your sitemap when adding new pages or posts to ensure search engines see the latest content.
  • Check for errors: Use tools like Google Search Console or Screaming Frog to validate your sitemap and fix broken links.
  • Choose the right format: XML sitemaps are standard for SEO, while HTML sitemaps improve user navigation on your site.
  • Don’t forget internal linking: A well-structured site with clear navigation supports both sitemaps and overall SEO performance.

How to Create Sitemap in WordPress

If you’re running a WordPress website, one of the smartest moves you can make for your SEO strategy is creating a sitemap. A sitemap is essentially a roadmap of your website that tells search engines like Google and Bing which pages to crawl and index. Without one, your new blog posts or product pages might go unnoticed—even if they’re high-quality.

In this guide, you’ll learn how to create a sitemap in WordPress using two reliable methods: with a plugin (the easiest way) and manually (for advanced users). We’ll also cover how to submit your sitemap to Google, troubleshoot common issues, and keep it optimized over time. Whether you’re a beginner or have some WordPress experience, this step-by-step walkthrough will help you boost your site’s visibility.

Why You Need a Sitemap in WordPress

How to Create Sitemap in WordPress

Visual guide about How to Create Sitemap in WordPress

Image source: thebloggingtime.com

Before diving into the how-to, let’s quickly understand why sitemaps matter. Search engines use automated bots called “crawlers” to explore websites. A sitemap acts as a guide, listing all your important pages, posts, images, and videos. This helps crawlers find content faster—especially new or updated pages that aren’t yet linked from other parts of your site.

Without a sitemap, search engines might miss pages buried deep in your site structure. Plus, sitemaps can include metadata like when a page was last updated or how often it changes, giving crawlers even more context. For WordPress users, this means better indexing, improved rankings, and ultimately, more organic traffic.

Method 1: Create a Sitemap Using a Plugin (Recommended)

How to Create Sitemap in WordPress

Visual guide about How to Create Sitemap in WordPress

Image source: roadtoblogging.com

The easiest and most effective way to create a sitemap in WordPress is by using a plugin. Most top SEO plugins include automatic sitemap generation. Here’s how to do it with two of the most popular options.

Option A: Using Yoast SEO

Yoast SEO is one of the most trusted SEO plugins for WordPress, used by over 5 million websites. It automatically creates an XML sitemap when activated.

  1. Install and activate Yoast SEO: Go to your WordPress dashboard > Plugins > Add New. Search for “Yoast SEO,” click “Install Now,” then “Activate.”
  2. Verify sitemap is enabled: Yoast generates a sitemap by default. To check, go to SEO > General > Features. Make sure “XML sitemaps” is turned on (it should be green).
  3. Access your sitemap: Your sitemap URL will be: https://yourdomain.com/sitemap_index.xml. Replace “yourdomain.com” with your actual site URL. You can also find this link under SEO > General > Indexing > Sitemaps.
  4. Submit to Google Search Console: Log in to Google Search Console, select your property, go to Sitemaps, and enter the sitemap URL. Click “Submit.”

Tip: Yoast updates your sitemap automatically whenever you publish or update content. No extra work needed!

Option B: Using Rank Math

Rank Math is another powerful SEO plugin that offers free sitemap functionality with more customization.

  1. Install Rank Math: From your WordPress dashboard, go to Plugins > Add New. Search for “Rank Math SEO,” install, and activate it.
  2. Run the setup wizard: After activation, follow the on-screen setup. During configuration, enable “Sitemap” under the Features section.
  3. View your sitemap: Once set up, your sitemap will be available at: https://yourdomain.com/sitemap_index.xml.
  4. Customize if needed: Go to Rank Math > Sitemap Settings to exclude certain post types, include images, or adjust priority levels.

Both Yoast and Rank Math are excellent choices. If you’re already using one for SEO, stick with it—no need to install multiple plugins.

Method 2: Create a Sitemap Manually (Advanced)

If you prefer not to use a plugin or need a custom solution, you can create a sitemap manually. This method requires basic technical knowledge and isn’t recommended for beginners, but it gives you full control.

Step 1: Create the XML File

Open a text editor like Notepad (Windows) or TextEdit (Mac). Write the following XML code, replacing the URLs with your actual page links:

“`xml



https://yourdomain.com/
2024-04-01
weekly 1.0


https://yourdomain.com/about/
2024-03-15
monthly 0.8


“`

Save the file as sitemap.xml.

Step 2: Upload via FTP

Use an FTP client like FileZilla to connect to your website. Upload the sitemap.xml file to the root directory (usually public_html or www).

Step 3: Submit to Search Engines

Go to Google Search Console and submit your sitemap URL: https://yourdomain.com/sitemap.xml. Do the same in Bing Webmaster Tools if desired.

Note: Manual sitemaps don’t update automatically. You’ll need to edit and re-upload the file every time you add or remove content—making this method time-consuming for active sites.

How to Submit Your Sitemap to Google

Once your sitemap is live, submitting it to Google Search Console ensures faster discovery.

  1. Go to Google Search Console and sign in.
  2. Select your website property.
  3. Click “Sitemaps” in the left menu.
  4. Enter your sitemap URL (e.g., https://yourdomain.com/sitemap_index.xml).
  5. Click “Submit.”

Google will now crawl your sitemap regularly. You can monitor indexing status and fix any errors directly in the dashboard.

Troubleshooting Common Sitemap Issues

Even with the best setup, you might run into problems. Here’s how to fix the most common ones.

Sitemap Not Found (404 Error)

If Google can’t access your sitemap, double-check the URL. Make sure it matches exactly what’s in your plugin settings or FTP upload. Also, verify file permissions—your server should allow public read access.

For more on fixing WordPress errors, check out our guide on 404 Error in WordPress.

Sitemap Shows Outdated Content

Plugins usually update sitemaps automatically, but if yours doesn’t, try clearing your cache. If you’re using a caching plugin like WP Super Cache or W3 Total Cache, purge the cache and reload your sitemap URL.

Excluded Pages Appear in Sitemap

Some plugins allow you to exclude certain post types or pages. In Yoast, go to SEO > Search Appearance > Content Types and adjust visibility. In Rank Math, use the Sitemap Settings to filter content.

Large Sites and Sitemap Limits

Google allows up to 50,000 URLs per sitemap and a maximum file size of 50MB. If your site is large, most plugins will split the sitemap into multiple files (e.g., post-sitemap.xml, page-sitemap.xml), which are linked in a master index.

Bonus: Add an HTML Sitemap for Users

While XML sitemaps are for search engines, an HTML sitemap helps real visitors navigate your site—especially useful for large websites.

You can create one easily using a plugin like “WP Sitemap Page” or by adding a shortcode (if your theme supports it). Place the sitemap on a dedicated page like /sitemap/ and link to it in your footer or main menu.

This improves user experience and supports internal linking, which boosts SEO.

Conclusion

Creating a sitemap in WordPress is a simple yet powerful step toward better search engine visibility. Whether you use a plugin like Yoast SEO or Rank Math, or go the manual route, having a properly structured sitemap ensures that search engines can find and index all your content efficiently.

Remember to submit your sitemap to Google Search Console, keep it updated, and monitor for errors. With these best practices in place, your WordPress site will be well-equipped to climb the search rankings and attract more visitors.

And if you’re managing your site’s appearance alongside SEO, don’t forget to explore related tasks like how to apply a WordPress theme or what is a child theme in WordPress—both of which can impact your site’s structure and performance.