RankMath XML Sitemap: Setup, Configuration, and Google Optimization
Learn how to set up and configure the RankMath XML sitemap so Google indexes all important pages of your WordPress website.
What Is an XML Sitemap and Why Do You Need One?
A RankMath sitemap is an XML file that provides Google and other search engines with a structured overview of all pages on your website. It acts like a roadmap for search engine crawlers, helping them find and index all important content quickly.
Without a sitemap, Google relies on links and crawling to discover new pages β this can take days or weeks. A sitemap significantly speeds up the process.
This article is part of our comprehensive RankMath Guide 2026.
Activating the RankMath Sitemap
Basic Activation
- Go to RankMath β Dashboard
- Make sure the Sitemap module is enabled
- Go to RankMath β Sitemap Settings
- Enable the XML sitemap
Your sitemap will then be available at: yourdomain.com/sitemap_index.xml
Understanding the Sitemap Structure
RankMath creates a sitemap index that references multiple individual sitemaps:
| Sitemap | URL | Content |
|---|
|---|---|---|
| Index | /sitemap_index.xml | Overview of all sitemaps |
|---|---|---|
| Posts | /post-sitemap.xml | All blog posts |
| Pages | /page-sitemap.xml | All static pages |
| Categories | /category-sitemap.xml | All categories |
| Tags | /post_tag-sitemap.xml | All tags (if enabled) |
| Products | /product-sitemap.xml | WooCommerce products |
Configuring the Sitemap
Including and Excluding Content Types
Under RankMath β Sitemap Settings β General, define which content types are included in the sitemap:
Recommended settings:
- Posts: Enabled
- Pages: Enabled
- Categories: Enabled (if filled with content)
- Tags: Disabled (usually thin content)
- Media: Disabled
- Author Archives: Disabled (for single-author blogs)
Excluding Individual Pages
You can exclude individual pages or posts from the sitemap:
- Open the post in the editor
- RankMath panel β Advanced
- Set "Include in Sitemap" to No
Typical exclusions:
- Legal pages and privacy policies
- Thank-you pages after form submissions
- Internal test pages
- Pages with noindex tags
Enabling the Image Sitemap
The image sitemap helps Google index your images for Google Image Search:
- RankMath β Sitemap Settings
- Include Images in Sitemap β Enable
Each sitemap entry will then also include the images found on that page.
Max URLs Per Sitemap
By default, RankMath limits the number of URLs per sitemap to 200. For larger websites, you can adjust this value:
- Small websites (< 100 pages): 200 URLs (default)
- Medium websites (100β1000 pages): 500 URLs
- Large websites (> 1000 pages): 1000 URLs
Google can process up to 50,000 URLs per sitemap, but smaller sitemaps load faster.
Submitting the Sitemap to Google
Via Google Search Console
- Open Google Search Console
- Select your property
- Navigate to Sitemaps in the left menu
- Enter your sitemap URL:
sitemap_index.xml - Click Submit
More on Search Console integration: RankMath and Google Search Console
Via robots.txt
RankMath automatically adds a reference to the sitemap in your robots.txt:
Sitemap: https://yourdomain.com/sitemap_index.xml
Fixing Common Sitemap Problems
Sitemap Not Reachable (404 Error)
Possible causes:
- Sitemap module not activated in RankMath
- Permalink structure not updated
- Conflicts with another plugin
Solution:
- Check RankMath β Dashboard β Sitemap module
- Settings β Permalinks β Save Changes (without changing anything)
- Deactivate other SEO plugins
Google Reports Errors in the Sitemap
| Error | Cause | Solution |
|---|
|---|---|---|
| URL not indexable | noindex set | Remove noindex or exclude URL from sitemap |
|---|---|---|
| 404 URLs in sitemap | Deleted pages | Regenerate sitemap |
| Redirect in sitemap | 301 redirect | Use destination URL instead of source URL |
| Blocked by robots.txt | Crawling prevented | Adjust robots.txt |
Sitemap Not Updating
RankMath automatically updates the sitemap when changes occur. If this is not working:
- Clear cache (plugin cache and server cache)
- Re-save permalinks
- Reset RankMath database under Status & Tools
Advanced Sitemap Optimization
News Sitemap (RankMath Pro)
For news portals, a news sitemap is essential. It is supported in RankMath Pro and contains articles from the last 48 hours.
Video Sitemap (RankMath Pro)
If you regularly embed videos, a video sitemap can increase visibility in Google Video Search.
HTML Sitemap
In addition to the XML sitemap, you can create an HTML sitemap for visitors:
- Create a new page
- Insert the RankMath HTML Sitemap block
- Configure (which content types, sorting)
An HTML sitemap also improves internal linking.
Sitemap Monitoring and Maintenance
Regularly check in Google Search Console:
- Submitted URLs vs. indexed URLs β large discrepancy?
- Errors and warnings β fix quickly
- Last updated β is the sitemap current?
Integrate sitemap checks into your SEO audit process.
AniSEO + RankMath: The Perfect SEO Combination
Combine RankMath with AniSEO for maximum SEO efficiency. AniSEO uses AI to automatically generate optimization suggestions that work perfectly with RankMath.
Frequently Asked Questions (FAQ)
Do I need to manually submit the sitemap to Google?
It is recommended to submit the sitemap once in Google Search Console. After that, Google detects updates automatically. The robots.txt reference additionally ensures that crawlers find the sitemap.
How many URLs should my sitemap contain?
Only include URLs that should be indexed. Pages with noindex, redirects, and thin content do not belong in the sitemap. Quality over quantity.
Do I need an additional sitemap plugin?
No, RankMath's built-in sitemap functionality is comprehensive and sufficient for most websites. An additional plugin can cause conflicts.
How quickly does Google index new pages after sitemap submission?
It varies. New pages on established domains are often indexed within hours. For new websites, it can take days to weeks. Use the "URL Inspection β Request Indexing" function in Search Console for important pages.
Should I include tags in the sitemap?
In most cases, no. Tags are often thin content pages with little added value. Exclude them to avoid wasting crawl budget. Exception: tags with unique, extensive content.
Hauptartikel zum Thema
RankMath SEO 2026: The Complete Guide for WordPress Users βPut these SEO strategies into action for your WordPress site β with AI-powered support from AniSEO.
Try for free now β