Research Guides
Check What a Sitemap Parser Reads Before Changing the URL
A sitemap URL can work in a browser yet break the sitemap’s XML. Check what a parser reads before changing the address.
Start with an approved public URL
Suppose a fictional publication intends to list https://example.com/report?edition=2026&format=html. The ampersand separates two query parameters. This example is about encoding, not a reason to list every variation. Use the sitemap audit worksheet to choose which URLs belong first.
Escape the XML without changing the address
The Sitemaps protocol’s entity escaping guidance requires XML data values to be escaped. In the raw sitemap the loc value should contain ?edition=2026&format=html. The parsed value should contain a single ampersand. An unescaped ampersand can invalidate the XML. Percent-encoding the separator as %26 is not a substitute: that can make the ampersand part of a value instead of a delimiter.
Verify the public file with a parser
Read the public sitemap as XML and compare its decoded loc with the approved URL. If the parsed value still contains the literal text &, check whether it was escaped twice. Open the decoded address and verify that it reaches the intended report with both parameters intact. Keep the raw XML and parsed value together in the verification record.
Copy this regression check
Approved URL | raw loc value | parser result | parameters expected | destination checked | fix needed
Test one URL with a query separator and one without. A rendered view alone may hide the difference.