Blog » Incorrect Namespace Error in Google Webmaster Tools

Incorrect Namespace Error in Google Webmaster Tools

If you are using AspDotNetStorefront, as well as possibly many other web applications, you may have noticed lately a number of errors showing up in your Google Webmaster Tools account. The error status indicates “Your Sitemap or Sitemap index file doesn’t properly declare the namespace.” or simply “Incorrect namespace” in the urlset tag.

Incorrect namespace in the urlset tag.

It appears that on or about May 10, 2010, Google has stopped accepting a sitemap namespace of either “http://www.google.com/schemas/sitemap/1.0” or “http://www.google.com/schemas/sitemap/0.84”. I’ve confirmed this across a number of websites that were using either of the namespace schemas indicated previously. They all processed fine prior to the 10th but from the 10th onward, they failed with an Incorrect namespace warning.

image

The correction to this problem is to use a different namespace schema. The one that is currently recommended on Google Webmaster site is the “http://www.sitemaps.org/schemas/sitemap/0.9”. In AspDotNetStorefront, changing this is ALMOST as simple as changing the GoogleSiteMap.Xmlns appconfig variable to the correct schema. This will update the output of the googleentity.aspx and googletopic.aspx pages so that they output the correct namespace schema.

image

However, the namespace in googleindex.aspx (the primary file) has an older schema hardcoded in it. You need to change the following line:

Response.Write("<sitemapindex xmlns=\"http://www.google.com/schemas/sitemap/0.84\">");

so that it reads:

Response.Write("<sitemapindex xmlns=\"" + AppLogic.AppConfig("GoogleSiteMap.Xmlns") + "\">");

These two simple changes should get you back up and running using sitemaps in Google Webmaster Tools!

Let us know if this works for you or if you have any other legitimate thoughts on this matter.

Michael Gibbs
Stalk Me...
Latest posts by Michael Gibbs (see all)