• Resolved mace09

    (@mace09)


    Hi, im receiving this error when i click on my xml sitemap.

    “error on line 2 at column 6: XML declaration allowed only at the start of the document”

    Are there any solutions this problem?

Viewing 1 replies (of 1 total)
  • Plugin Author Webbjocke

    (@webbjocke)

    Hi the problem is probably that your theme or one of your plugins are having an error, which gets “hided” and results in the empty rows at the top of your documents which are invalid for xml. If your html sitemap works just fine this is definitely the case.

    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). Change false to true there and then reload the xml sitemap. Then you’ll see what the error is. If it’s still empty rows you might have disabled errors for your site in your hosting companys c-panel. Then log in there and switch to “show errors” and you should be able to locate the error.

    If you don’t understand any of this or don’t know how to fix the problem just send me a list of your theme and plugins and I’ll have a look.

Viewing 1 replies (of 1 total)

The topic ‘Error when viewing xml sitemap’ is closed to new replies.