WordPress Sitemap Blank? Diagnose and Fix XML Sitemap Issues

A blank WordPress sitemap does not necessarily mean your sitemap is broken. An XML sitemap can look completely white in a browser even when it contains valid, readable data for Google. The problem may be its presentation stylesheet, an empty sitemap, a WordPress routing error, a cache or a security challenge.
Before resetting Rank Math, reinstalling plugins or submitting the sitemap again, inspect the actual response. This guide covers Rank Math, Yoast and the built-in WordPress sitemap, with a specific diagnostic path for blank category sitemaps.
Table of Contents
WordPress sitemap blank: identify the type of failure
| What you find | Meaning | Next action |
|---|---|---|
| White page, valid XML containing URLs | Display or stylesheet problem | Verify XML, then inspect XSL if needed |
| Empty urlset element | No URLs included in that sitemap | Check content eligibility and sitemap settings |
| Empty response body | Output or server error | Inspect PHP and server logs |
| 404 or redirect to homepage | Wrong endpoint or rewrite problem | Check the plugin’s actual sitemap URL |
| 403 or challenge page | Security restriction | Inspect CDN and host logs |
| XML parsing error | Invalid output, encoding or injected content | Find the invalid bytes and their source |
| 200 with an HTML page | Not a working XML sitemap | Fix routing, security or caching |
The distinction matters: fixing the way XML looks to a human does not necessarily improve indexing, while a genuinely inaccessible sitemap requires immediate attention.
1. Find the correct sitemap URL
Most WordPress installations use one of the following paths, depending on configuration:
| Sitemap provider | Common default URL |
|---|---|
| WordPress core | /wp-sitemap.xml |
| Rank Math | /sitemap_index.xml |
| Yoast SEO | /sitemap_index.xml |
Your site may use different paths through custom configuration, redirects or a multisite setup. Open the active SEO plugin’s sitemap settings and use the URL it actually reports. Rank Math and Yoast can replace the WordPress core sitemap, so a missing wp-sitemap.xml is not automatically a defect.
Check whether more than one plugin is trying to generate XML sitemaps. Choose one intended provider rather than maintaining multiple overlapping sitemap systems. If a physical sitemap.xml file exists on the server, determine whether it is intentional before moving or deleting it. It might be overriding a dynamic endpoint.
2. View the page source and inspect the HTTP response
Open the sitemap in a private browser window. Use View Page Source, or open Developer Tools → Network, reload and select the sitemap request. A valid sitemap index contains sitemap entries with loc elements, while an individual sitemap contains URL entries with loc elements.
For a more reliable inspection, download the body and headers separately. Replace the example hostname below with your own:
curl -sS -L -D sitemap-headers.txt -o sitemap.xml https://example.com/sitemap_index.xml
Examine the final status code and Content-Type. XML is expected, commonly application/xml or text/xml. Open sitemap.xml in a plain text editor. A minimal example of a valid URL sitemap is:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>https://example.com/example-post/</loc></url>
</urlset>
This is only an illustration, not a sitemap to upload. If an XML parser is available, validate the saved response with xmllint --nonet --noout sitemap.xml. Passing that check establishes XML well-formedness, not that every URL is appropriate for indexing. Check actual entries as well.
If the response contains a login form, WordPress homepage, CDN challenge or PHP warning, it is not the intended sitemap even if the status is 200. If a stylesheet is declared near the XML header, inspect the stylesheet request separately. A missing XSL file can affect browser presentation without invalidating the sitemap’s underlying XML.
3. Fix a blank Rank Math sitemap caused by presentation or routing
Open Rank Math SEO → Dashboard and confirm the Sitemap module is enabled. Go to Sitemap Settings and use the displayed sitemap index link. Menu names may differ slightly by version.
Rank Math’s sitemap troubleshooting guide suggests checking an alternate query-based endpoint when the pretty sitemap URL is problematic. For its standard index, test https://example.com/?sitemap=1 as a diagnostic. If this returns the expected XML while /sitemap_index.xml fails, investigate the rewrite path instead of assuming the content is missing.
If pretty permalinks are already configured, go to Settings → Permalinks and save the existing settings once. This can refresh WordPress rewrite rules without changing your URL structure. Do not switch a live site to a different permalink structure just to troubleshoot a sitemap.
On Apache or Nginx, unusual server-level rewrite rules may need attention. Ask the host to compare the active configuration with the SEO plugin’s documentation. Back up custom configuration first. Nginx does not process .htaccess, so copying Apache rules to an Nginx server will not solve the problem.
If you use Yoast instead of Rank Math
Use Yoast’s XML sitemap link in its settings and check that the WordPress Address and Site Address match the intended public configuration. If XML is present but the browser displays a blank page, check the stylesheet URL; if the XML itself is empty, inspect eligible content and plugin conflicts. Follow Yoast’s blank sitemap guide for its provider-specific steps. Do not apply Rank Math’s query endpoint or filters to Yoast.
4. Why is category-sitemap.xml blank?
A blank category sitemap can be a different problem from a blank post sitemap. First check whether the index still lists the category sitemap. Then inspect the child response directly and count the actual loc entries. If there are no eligible categories, investigate these settings:
- Whether category archives are enabled in the SEO plugin’s taxonomy sitemap settings.
- Whether the category is empty or has published posts assigned to it.
- Whether the archive is deliberately set to noindex or excluded by plugin settings or filters.
- Whether a stale cached sitemap index references a category sitemap that no longer exists.
- Whether the site recently changed category names, visibility or editorial structure.
Do not make every taxonomy indexable just to populate an XML file. A deliberately excluded thin or redundant archive can be the right decision. For important topic hubs intended to rank, check the archive’s public canonical URL, robots meta tag, content and internal links. The sitemap should reflect the intended indexing strategy, not dictate it.
Worked example: posts are present, categories are not
Suppose /post-sitemap.xml returns 40 post URLs and /category-sitemap.xml displays a white page. The source of the category response contains an empty urlset. The likely next step is to inspect the taxonomy inclusion and archive indexing settings, not to reinstall the entire SEO plugin. If the category archives are intentionally excluded, remove the obsolete reference from the sitemap index by refreshing the provider’s configuration and cache. If they are intended as search landing pages, repair the archive eligibility and retest.
5. Exclude sitemap endpoints from page caching
Sitemaps are dynamic representations of eligible content. A page cache or custom CDN rule may serve an outdated empty response or an HTML transformation rather than fresh XML. Clear the cache for the sitemap index, relevant child sitemaps and stylesheet. Then configure a narrow cache bypass or exclusion for the actual sitemap endpoints, especially if a rule caches HTML indiscriminately.
Check WordPress cache plugins, host caching and Cloudflare separately. Cloudflare does not necessarily cache every XML URL by default; custom cache rules and third-party integration can change that behavior. Do not assume a CDN is the cause just because the site uses one. Compare the response headers and cache status, and ask the host to compare the origin response when needed.
Rank Math also documents controls for its internal sitemap caching. Use them only when testing identifies that layer. A filter pasted into functions.php is not the first step; a syntax error there could break the site.
6. Diagnose XML errors and security restrictions
A parsing error at the beginning of the XML may point to stray output, a PHP warning, a byte-order mark or a plugin injecting text before the XML declaration. Inspect PHP error logs and the raw response on staging; avoid exposing debugging output on a production site. Disable recently changed plugins individually in a controlled environment and retest.
A 403 or challenge should be treated differently. Check whether the response came from Cloudflare, the host or a WordPress security plugin. The Cloudflare Googlebot troubleshooting guide explains how to distinguish these layers without turning off security across the website. A Googlebot user-agent string alone does not prove that a request comes from Google.
7. Verify and submit the sitemap in Search Console
Once the index and child files return valid XML with intended canonical URLs, open Google Search Console → Sitemaps in the appropriate property and submit the index URL. Use the report to check fetch and processing status. Inspect a representative listed page using URL inspection and check its live fetch and indexing eligibility separately.
A sitemap helps Google discover URLs but does not guarantee crawling, indexing or rankings. A successful sitemap fetch also does not prove that each URL listed is accessible. Google explains these distinctions in its sitemap overview and Sitemaps report documentation.
Frequently asked questions
Is a white sitemap page bad for SEO?
Not if the actual response is valid XML containing the intended URLs and is accessible to Google. A visual stylesheet issue alone is not an indexing failure.
Should I remove and resubmit the sitemap every day?
No. Repair the underlying response or content configuration, submit the correct index and let Google process it. Repeated submission does not force every URL into the index.
Why does Google say couldn’t fetch if I can open the sitemap?
The report may reflect an earlier failed fetch, or Google may encounter different access rules than your browser. Check the current response, property hostname, security logs and Search Console’s live diagnostic options.
Should a sitemap itself be indexed?
No. Its function is discovery, not appearing as a search result. A noindex response header on the sitemap itself is not the same as noindex on the pages listed inside it.
Final checklist
Confirm the intended provider, inspect the actual XML, check child sitemap eligibility, verify rewrite and cache behavior, and submit the valid index. If the data is already valid and Google can fetch it, prioritize useful content and internal links over making the XML look attractive in a browser.
Recent articles
Our editorial approach
Clear explanations, practical guidance and responsible research.




