My XML Sitemap Looks Broken. Is It Really?
Your sitemap suddenly shows as raw code in Chrome? Don't panic. This prompt checks if Google can still read it, explains why it looks different, runs a full sitemap health check and writes a calm note you can send to a worried client.
Example input
This is exactly what we gave the model. You replace it with your own details.
- Website: https://blog.example.org
- Sitemap URL(s): /sitemap_index.xml
- CMS and SEO plugin with version: WordPress 6.9 with Yoast SEO
- What I see: Since last week the sitemap opens in Chrome as plain code with a grey message at the top, not the neat table it used to show. My client thinks the site is broken.
- Search Console sitemap status (if known): Success, last read 3 days ago, 1,284 discovered pages
- Optional: paste the first 30 lines of the sitemap source:
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//blog.example.org/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://blog.example.org/post-sitemap.xml</loc>
<lastmod>2026-11-27T08:12:44+00:00</lastmod>
</sitemap>
<sitemap>
<loc>https://blog.example.org/page-sitemap.xml</loc>
<lastmod>2026-10-02T10:01:19+00:00</lastmod>
</sitemap>
<sitemap>
<loc>https://blog.example.org/category-sitemap.xml</loc>
<lastmod>2026-11-27T08:12:44+00:00</lastmod>
</sitemap>
</sitemapindex>Real output
Pasted straight from the model. We did not fix a word.
Verdict: Only a display change. Chrome stopped applying the XSL "table" styling, but Google read your sitemap 3 days ago, after the change started, and still reported Success with 1,284 discovered pages.
Quick questions (with my best guesses)
I'll continue using these guesses. Correct me if any of them is wrong.
- Which Yoast SEO version are you on? Guess: a current 2026 version with auto-updates on.
- Which Chrome version are you on? (Open
chrome://settings/helpto see it.) Guess: Chrome updated itself last week to a version that no longer runs XSLT, which would explain "since last week". - Did anything else change on the site last week (new plugin, theme, host, CDN or security plugin)? Guess: no.
- Do the child sitemaps (
post-sitemap.xml,page-sitemap.xml,category-sitemap.xml) open the same way, with the grey note and a list of URLs? Guess: yes. - Does your robots.txt have a Sitemap line? Guess: yes, added by Yoast.
1. Display change or real error? A 2-minute check
What your symptom means: The grey note at the top is Chrome's normal view of an XML file that has no styling applied. It usually says something like "This XML file does not appear to have any style information". The first line of your sitemap links Yoast's stylesheet (//blog.example.org/main-sitemap.xsl). That file only ever turned the code into a neat table for humans. Google never used it.
Check A: view-source
- Paste this into Chrome's address bar:
view-source:https://blog.example.org/sitemap_index.xml - The very first characters must be
<?xml version="1.0", with no blank line or space before them. - Below that you should see
<sitemapindex ...>with<sitemap>entries, just like the code you pasted.
Check B: DevTools
- Open the sitemap normally and press F12 (Mac: Cmd+Option+I).
- Go to the Network tab, reload the page, and click
sitemap_index.xml. Under Headers, look for:- Status Code: 200
- Content-Type: text/xml (Yoast usually sends
text/xml; charset=UTF-8) X-Robots-Tag: noindex, followis normal for Yoast sitemaps. It keeps the sitemap file itself out of search results. Google still reads it.
- Open the Console tab (or Issues). A warning that XSLT is deprecated or removed confirms that this is the Chrome change.
- Repeat for one child sitemap, for example
https://blog.example.org/post-sitemap.xml.
Signs of a real problem (none of these match what you described):
- A red or pink box that says "This page contains the following errors…" means broken XML.
- You get a normal web page, a login page, a "checking your browser" page or your theme's 404 page instead of XML. That means the server is sending the wrong response.
- The status is 404, 403, 500 or 503, or the sitemap redirects to some other page.
- You see a blank page, or
<sitemapindex>with no<sitemap>entries (an empty file). - Search Console shows "Couldn't fetch" or "Has errors".
Small note: /sitemap.xml redirecting to /sitemap_index.xml is normal for Yoast. It is not an error.
2. Sitemap health checklist
Based on what you shared, nothing fails except the look in Chrome, and that is not an SEO issue. Rows marked "Not checked" use my guess. The Fix column is there in case one of those rows fails when you test it.
| Check | How to test | Pass/Fail | Fix (WordPress 6.9 + Yoast SEO) |
|---|---|---|---|
| Returns 200 (index and child sitemaps) | DevTools > Network: Status 200 and Content-Type text/xml for sitemap_index.xml and each child sitemap | Likely Pass (guess): Search Console read it with Success 3 days ago | Only if it fails. 404: go to Settings > Permalinks and click Save Changes (no edits needed) to refresh the rewrite rules. On an Nginx server, add Yoast's sitemap rewrite rules (see the Yoast help docs). 403/503: allow sitemap URLs in your security plugin or CDN firewall. 500: check the PHP error log or ask your host. |
| Valid XML and namespace | view-source: starts with <?xml; namespace is http://www.sitemaps.org/schemas/sitemap/0.9; grey note in Chrome, not a red error box | Pass (from your paste) | If there's a space or blank line before <?xml, it usually comes from a stray blank line after ?> in the theme's functions.php or in a plugin. On a staging copy, switch to a default theme or turn plugins off one by one to find it. |
| Absolute URLs on the correct host and protocol | Every <loc> starts with https://blog.example.org/. Check the child sitemaps too | Pass for the index (all 3 match). Child sitemaps: Not checked (guess: Pass) | Settings > General: both WordPress Address and Site Address should be https://blog.example.org. The protocol-relative //blog.example.org/main-sitemap.xsl is only the stylesheet link, so it's fine. |
| Size within limits | Count URLs per file | Pass: 1,284 URLs in total, far below 50,000 URLs / 50 MB per file | None. Yoast splits each sitemap at 1,000 URLs by default, so if a post-sitemap2.xml appears later, that's normal. |
| Only canonical, indexable 200 pages | Search Console > Indexing > Pages. Set the top filter to "All submitted pages" and look for "Alternate page with proper canonical tag" or "Duplicate…" reasons | Not checked (guess: Pass) | In Yoast SEO > Settings > Content types and Categories & tags, set anything you don't want in Google to "Show in search results: Off". Yoast then drops it from the sitemap. For a single post, use the Yoast box > Advanced. Yoast normally also leaves out posts whose Yoast canonical points to another URL. |
| No redirects, 404s or noindex pages | Same Pages report, filtered to submitted pages: look for "Page with redirect", "Not found (404)" and "Excluded by 'noindex' tag". Or run the optional script in section 4 on post-sitemap.xml | Not checked (guess: Pass, or only a few) | Redirect: a published post is being redirected by a redirect plugin. Remove the redirect or unpublish the old post. 404: clear your page cache or CDN cache, and exclude sitemaps from caching. Noindex: make sure Settings > Reading > "Discourage search engines" is unticked, and check that no other plugin or theme adds noindex. |
| Honest lastmod | Compare the lastmod dates with when you really published or edited | Pass: posts and categories show 27 Nov 2026 (your latest post) and pages show 2 Oct 2026, so the dates aren't all set to "today" | None. Leave Yoast's automatic dates alone. If the dates ever jump every day without real edits, look for a plugin that re-saves posts on a schedule. |
| Listed in robots.txt | Open https://blog.example.org/robots.txt and look for Sitemap: https://blog.example.org/sitemap_index.xml | Not checked (guess: Pass) | Depends on your Yoast version. Recent versions add this line automatically, often inside a # START YOAST BLOCK section. If you have a physical robots.txt file, add the line yourself in Yoast SEO > Tools > File editor, or by FTP. |
| Submitted in Search Console | Search Console > Indexing > Sitemaps | Pass: Success, last read 3 days ago, 1,284 discovered pages | None. No need to resubmit. You can click the index to confirm each child sitemap also shows Success. |
| Looks like a table in Chrome | Open it in Chrome | Changed (display only, not an SEO fail) | Optional. See the readable-view options below. |
Version note: Yoast menu names and some of its behaviour (the robots.txt line, which posts it leaves out) depend on your plugin version. If a menu isn't where I say, check the Yoast SEO changelog (WordPress.org plugin page > Changelog).
3. Options for a readable view (for humans)
Option A: Wait for a Yoast update (easiest). Sitemap plugins will probably switch to a view that doesn't need XSLT, for example CSS styling. Guess: I expect Yoast to ship something like this, but I can't confirm when or how. This depends on your plugin version. After each update, check the Yoast SEO changelog for "XSL", "XSLT" or "sitemap".
Option B: A simple HTML sitemap page (best for your client and visitors). WordPress 6.9 can do this with its built-in blocks, no extra plugin needed:
- Go to Pages > Add New, add the title "Site map" and use the slug
site-map. - Add these blocks: Page List, Categories List, and Archives (it lists months, so it stays short even with 1,000+ posts). You can add Latest Posts for recent articles.
- Publish, then link the page in your footer.
This is a normal page for people, and it adds helpful internal links. It does not replace the XML sitemap.
Option C: Remove the XSL line with a small must-use plugin (temporary). This stops Yoast adding the <?xml-stylesheet ...?> line. To be honest, it does not bring the table back: Chrome will still show the grey note and the code. All it does is remove the XSLT warning and give every browser the same plain view. (Browsers that still support XSLT will lose the table too.) Only use it if the warning bothers you or a monitoring tool flags it, and delete it after Yoast updates its sitemap view. The code is below.
My pick: Option B for the client now, and Option A for the long term. Skip C unless you need it.
4. Code snippets
Back up first. Before you add any file to the site, take a full backup (files + database). Also make sure you can reach your files by FTP or through your host's file manager. A typo in a must-use plugin can break the whole site, and you can't switch it off from wp-admin. You would have to delete the file.
A. Read-only checks (safe, they change nothing). Run them in the Mac or Linux Terminal. On Windows, just use the DevTools steps above.
# Status and content type of the index and one child sitemap
curl -sI https://blog.example.org/sitemap_index.xml
curl -sI https://blog.example.org/post-sitemap.xml
# The first characters must be <?xml
curl -s https://blog.example.org/sitemap_index.xml | head -c 200
# Is the sitemap listed in robots.txt?
curl -s https://blog.example.org/robots.txt | grep -i sitemap
What you should see: 200, content-type: text/xml, and Sitemap: https://blog.example.org/sitemap_index.xml.
B. Optional: find non-200 URLs in one child sitemap. This checks the URLs one at a time and prints only the problems. It can take a few minutes, and a security plugin may slow it down.
curl -s https://blog.example.org/post-sitemap.xml \
| grep -o '<loc>[^<]*' | sed 's/<loc>//' \
| while read -r url; do
code=$(curl -s -o /dev/null -w '%{http_code}' "$url")
[ "$code" != "200" ] && echo "$code $url"
done
If it prints nothing, every URL returned 200.
C. Must-use plugin to remove the XSL line (optional, temporary).
- Back up (see the warning above).
- Using FTP or your host's file manager, go to
wp-content/. If there's no folder calledmu-plugins, create one. - Create the file
wp-content/mu-plugins/remove-yoast-sitemap-xsl.phpwith this code:
<?php
/**
* Plugin Name: Temporary - Remove Yoast sitemap XSL
* Description: Stops Yoast SEO adding the XSL stylesheet line to XML sitemaps. Delete this file once Yoast ships a sitemap view that does not need XSLT.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
add_filter( 'wpseo_stylesheet_url', '__return_false' );
- Clear any page cache or CDN cache.
- Open
view-source:https://blog.example.org/sitemap_index.xml. The<?xml-stylesheet ...?>part should be gone, and everything else should be unchanged. - The file runs on its own, with no activation needed, and you'll see it under Plugins > Must-Use. To undo it, delete the file.
Version note: This uses Yoast's wpseo_stylesheet_url filter. It has been around for years, but check the Yoast SEO changelog in case it changes. If the stylesheet line is still there after you clear the caches, the filter may work differently in your version. In that case, delete the file and go with Option A.
5. What NOT to do
- Don't rebuild or "reset" the sitemap. It's valid and Google reads it. Switching Yoast's sitemap off and on can cause short 404s for no gain.
- Don't switch SEO plugins in a panic. Any sitemap that uses XSLT looks the same in new Chrome. Switching would change your sitemap URLs and your title and meta settings. That's real risk for nothing.
- Don't fake lastmod dates. Your dates look honest right now (27 Nov for posts, 2 Oct for pages). Changing them every day won't make Google crawl every day, and it can make Google trust your dates less.
- Don't delete and resubmit the sitemap in Search Console. It already shows Success.
- Don't add a second sitemap plugin, and don't turn on WordPress's own
wp-sitemap.xmlnext to Yoast.
Message for your client
Hi [Client name],
Good news: your website and its sitemap are working fine. Google Chrome recently stopped supporting an old styling trick that made sitemaps look like a neat table. Now the file shows as plain code with a grey note at the top. That's just how Chrome displays it. It isn't an error.
Search engines never used that styling. They read the code directly. Google Search Console confirms it: status "Success", read 3 days ago, 1,284 pages found. Rankings aren't affected and nothing needs fixing.
If you'd like a readable list of pages for visitors, I can add a simple site map page.
Best, [Your name]
The prompt
First lines open so you can see how it is built. The rest opens after purchase.
#ROLE You are a technical SEO expert who specializes in XML sitemaps and crawling. My sitemap looks broken in the browser and I need to know if there is a real problem. #INPUTS Fill in every line. Leave a line blank if you don't know it. - Website: [WEBSITE URL] - Sitemap URL(s): [e.g., /wp-sitemap.xml, /sitemap_index.xml, /sitemap.xml] - CMS and SEO plugin with version: [e.g., WordPress + Yoast, Rank Math, AIOSEO, Shopify, custom]
How to use it
- Buy, then open it in your account.
- Copy the prompt into ChatGPT, Claude or Gemini.
- Replace the 6 inputs with your product.
- Run it. Use the output. Re-run with a different tone if you like.
Pro tips
- Paste the first lines of the sitemap source (right-click, View page source). The 'xml-stylesheet' line tells the AI at once whether it's only the display change.
- Send the client note it writes before you touch anything. Most 'broken sitemap' panics end there.
- If the verdict is 'real problem', work through the checklist in order. Status code and blocked URLs come first.
Before you buy
- Will it work for my product?
- Yes, if you can fill the 6 inputs. If the output is bad with your inputs, email us: we fix the prompt and refund you.
- Do I download a file?
- No. It lives in your account with a copy button, and updates when we improve it.
- Which model is best?
- Best on Claude. Works in ChatGPT, Claude and Gemini.
Works well with this
Prompts people use in the same campaign.
More in Crawling & Indexing
Buying more than two? Lifetime is cheaper.
Every prompt, every category, forever. $59 once. Nothing to download, nothing to renew.
This prompt
$3$7
- ✓ Instant access in your account, with a copy button
- ✓ Example input and real output included
- ✓ 7-day money-back, no form
Or get every prompt, forever
Lifetime Access · $59 $149 — all categories, all future prompts, rewrites included.
Get lifetime accessCard or PayPal · taxes at checkout · nothing to download
Not the one you need?
Browse every prompt by category and sub-category.