Title: XML Sitemap Error
Last modified: August 30, 2016

---

# XML Sitemap Error

 *  Resolved [decent_dev](https://wordpress.org/support/users/decent_dev/)
 * (@decent_dev)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/xml-sitemap-error-10/)
 * Hi,
    html sitemap works fine but got problem with XML sitemap.
 * In Mozilla Firefox error:
    XML Parsing Error: XML or text declaration not at 
   start of entity Location: [https://www.holidaysbychoice.com/sitemap.xml](https://www.holidaysbychoice.com/sitemap.xml)
   Line Number 4, Column 1:<?xml version=”1.0″ encoding=”UTF-8″?> ^
 * And in GoogleChrome:
    This page contains the following errors: error on line 
   4 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.
 * [https://wordpress.org/plugins/simple-wp-sitemap/](https://wordpress.org/plugins/simple-wp-sitemap/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Webbjocke](https://wordpress.org/support/users/webbjocke/)
 * (@webbjocke)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/xml-sitemap-error-10/#post-6503652)
 * Hi I looked at your link and it seems like something is printing some empty rows
   at the top of the page, which is not allowed for xml.
 * My guess is that it’s some plugin doing this, so if you tell me which ones you’re
   using I’ll look it up. Does the error disappear if you try and disable some of
   them?
 *  Thread Starter [decent_dev](https://wordpress.org/support/users/decent_dev/)
 * (@decent_dev)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/xml-sitemap-error-10/#post-6503655)
 * Hi, thanks for reply.I disabled all plugins but still the same error.
 * Strange thing is, even though I am getting this error but when submitted to Google&
   Bing webmaster, they are able to read it as tells me how many links are submitted
   in sitemap. (I think it works in IE though).
 * I am using Expedia Support Plugin, GZip Ninja Speed Compression, Material Admin
   Theme, Page Links To, WordPress HTTPS, WordPress Importer, Yoast SEO (with sitemap
   disabled).
 * Thanks
 *  Plugin Author [Webbjocke](https://wordpress.org/support/users/webbjocke/)
 * (@webbjocke)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/xml-sitemap-error-10/#post-6503679)
 * Ok ty for the info. The plugins wasn’t the problem.
 * Yeah that’s strange. Maybe they don’t really care if it’s valid, just as long
   as the links are there heh.
 * Anyway then the empty rows probably come from an error printing out that gets“
   hided”. Are you comfortable with code? In the file wp-config.php in your sites“
   root folder” there’s a line saying: define(’WP_DEBUG’, false). Try and change
   false to true there and then reload the sitemap, if there now are some errors
   showing up we’ll know what the problem is. Btw don’t forget to change back to
   false once you’ve tested.
 * Otherwise sorry I don’t know. Maybe try to uninstall and reinstall the plugin
   and see if that could do the trick. Good luck
 *  Thread Starter [decent_dev](https://wordpress.org/support/users/decent_dev/)
 * (@decent_dev)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/xml-sitemap-error-10/#post-6503681)
 * Hi, I did as you said. Gave error:
    Undefined variable: lang in /home/****/functions.
   php on line 98
 * Went to check and found line 98 was empty & was between
    (Line 97) $theme = new
   Theme(); (Line 98) (Line 99) $theme->init(array(
 * Hence when back to change debug value to false. And you know what, WordPress 
   is full of surprises. After refreshing xml sitemap, it started working perfect.
 * Thanks for your help.
 *  Plugin Author [Webbjocke](https://wordpress.org/support/users/webbjocke/)
 * (@webbjocke)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/xml-sitemap-error-10/#post-6503705)
 * Right well great then! Yeah it sure is.
 * Np happy to help 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘XML Sitemap Error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/simple-wp-sitemap_859b84.svg)
 * [Simple Wp Sitemap](https://wordpress.org/plugins/simple-wp-sitemap/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-wp-sitemap/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-wp-sitemap/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-wp-sitemap/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-wp-sitemap/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-wp-sitemap/reviews/)

## Tags

 * [xml sitemap error](https://wordpress.org/support/topic-tag/xml-sitemap-error/)

 * 5 replies
 * 2 participants
 * Last reply from: [Webbjocke](https://wordpress.org/support/users/webbjocke/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/xml-sitemap-error-10/#post-6503705)
 * Status: resolved