-
Having this error in my sitemap page:
https://medsurgbanks.com/sitemap_index.xmlThis page contains the following errors:
error on line 6 at column 6: XML declaration allowed only at the start of the document
Below is a rendering of the page up to the first error.When I view page source, I see this on line 1:
<?xml version=”1.0″ encoding=”UTF-8″?><?xml-stylesheet type=”text/xsl” href=”//medsurgbanks.com/main-sitemap.xsl”?>The XSL stylesheet declaration is on the SAME LINE as the XML declaration, which breaks XML validation.
I’ve tried:
– Adding filter: add_filter(‘rank_math/sitemap/enable_xsl’, ‘__return_false’); in functions.php
– Flushing permalinks multiple times
– Clearing Rank Math cache
– Checking for plugin conflicts
– Nothing worksThe sitemap is being rejected by XML validators and may affect Google Search Console indexing.
Please advise how to fix this issue or disable the XSL stylesheet properly.
Thank you!
You must be logged in to reply to this ticket.