Question:

What is wrong with my sitemap.xml?

by  |  earlier

0 LIKES UnLike

I used Googles Sitemap creator to make my sitemap.xml file, and now the sitemap tool keeps telling me there are 2 errors:

Line:2 Invalid XML attribute

The XML attribute of this tag was not recognized. Please fix it and resubmit.

Problem detected on: urlset

Attribute: schemaLocation

Line: 2 Incorrect namespace

Your Sitemap or Sitemap index file doesn't properly declare the namespace.

Problem detected on: urlset

Now, like I said, "googles" tool made the thing.. why would there be errors??

 Tags:

   Report

1 ANSWERS


  1. Without seeing your XML, I can't diagnose the problem with great certainty. Seems the complaint is about the xmlns (XML namespace attribute) for the schema's location of your urlset tag. Here's a properly declared sample (leading dots just keep indentation, since Y!A deletes leading whitespace - they are not valid):

    <?xml version = "1.0" encoding = "UTF-8"?>

    <urlset xmlns= "http://www.sitemaps.org/schemas/sitemap...

    ....<url>

    ........<loc> http://home.comcast.net/~richarduie/inde... </loc>

    ........<lastmod> 2008-06-05 </lastmod>

    ........<changefreq> monthly </changefreq>

    ........<priority> 0.9 </priority>

    ....</url>

    </urlset>

    Why Google's tools would incorrectly specify the value, I have no idea. I compose my own.

    Added: the xmlns attribute value that got truncated is

    http:// www. sitemaps. org/ schemas/ sitemap/ 0.9

    without the spaces.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.