[MSU Sitemaps] Google warning

Technical difficulties? Ask for help here.
david12345
Posts: 5
Joined: Thu May 29, 2008 2:03 am

[MSU Sitemaps] Google warning

Postby david12345 » Thu May 29, 2008 2:15 am

In my google webmaster tools in google I get the following warning:

Code: Select all

Leading whitespace
We've detected that your Sitemap file begins with whitespace. We've accepted the file, but you may want to remove the whitespace so that the file adheres to the XML standard


How do I remove the white space?

Also if I try to view the sitemaps.php file in my browser I get the following error:

Code: Select all

XML Parsing Error: xml declaration not at start of external entity
Location: http://www.mydomain/sitemaps.php
Line Number 3, Column 1:<?xml version="1.0" encoding="UTF-8"?>
^


Is this normal?

inveo
Inveo Support
Posts: 1285
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: [MSU Sitemaps] Google warning

Postby inveo » Thu May 29, 2008 4:41 am

MSU Sitemaps were not uploaded correctly or there is some PHP error message. Please post the URL of Sitemaps.


inveo
Inveo Support
Posts: 1285
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: [MSU Sitemaps] Google warning

Postby inveo » Wed Jun 18, 2008 7:24 am

It look like Sitemaps files were corrupted or uploaded incorrectly. Please try to re-upload them and make sure you are using BINARY mode (not ASCII mode).

david12345
Posts: 5
Joined: Thu May 29, 2008 2:03 am

Re: [MSU Sitemaps] Google warning

Postby david12345 » Wed Jun 18, 2008 8:14 am

Thanks for the suggestion. I just re-uploaded the files making sure I was in binary mode. Didn't fix it. Any other ideas?

inveo
Inveo Support
Posts: 1285
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: [MSU Sitemaps] Google warning

Postby inveo » Wed Jun 18, 2008 9:49 am

I think this problem is caused by web server configuration, because it adds spaces to the beginning of each page, no matter whether it is SItemap or other pages.

david12345
Posts: 5
Joined: Thu May 29, 2008 2:03 am

Re: [MSU Sitemaps] Google warning

Postby david12345 » Thu Jun 19, 2008 2:27 am

~J~ wrote:I think this problem is caused by web server configuration, because it adds spaces to the beginning of each page, no matter whether it is SItemap or other pages.


Would be anything I can change on my web server config configuration? Is it fixable and is it worth contacting my host?

I confused becuase google has accepted the sitemaps and it have indexed about 1000 pages out 5000. So is whats the XML Parsing Error all about ?

Thanks.

inveo
Inveo Support
Posts: 1285
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: [MSU Sitemaps] Google warning

Postby inveo » Thu Jun 19, 2008 4:02 am

david12345 wrote:Would be anything I can change on my web server config configuration? Is it fixable and is it worth contacting my host?


I think yes.

david12345 wrote:I confused becuase google has accepted the sitemaps and it have indexed about 1000 pages out 5000. So is whats the XML Parsing Error all about ?


XML parsing error is about the spaces which are added to the begging of Sitemaps files.

david12345
Posts: 5
Joined: Thu May 29, 2008 2:03 am

Re: [MSU Sitemaps] Google warning

Postby david12345 » Fri Jun 20, 2008 2:52 pm

Just got a reply from my host:

It looks like the web service being used was returning an XML document with a newline before the XML declaration (i.e. &lt;?xml ... ?&gt;). This is actually not allowed by the XML specification and it causes an error in the browser. So you should recheck your code and fix that problem in the xml file.


I have tried uploading the sitemaps again freshly downloaded from: http://www.magic-seo-url.com/downloads/ ... 1.0.01.zip


Could it caused by another file on my server? All suggestions welcome.

Thanks.

inveo
Inveo Support
Posts: 1285
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: [MSU Sitemaps] Google warning

Postby inveo » Fri Jun 20, 2008 4:12 pm

Reply from host is exactly what I mean. This problem is caused by added spaces to any page/sitemap (you can see that any HTML page has also spaces in the beginning) generated by Zen Cart and freely distributed MSU Sitemaps are also affected because are using Zen Cart API (files).
Check especially files in includes directory. Spaces may be placed before <?php but also after ?>.