Sitemap validation

  04/08/07 01:05, by , Categories: Specs

The following XML schema defines the elements and attributes that can appear in your Sitemap file. You can download this schema from the link below:

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

There are a number of tools available to help you validate the structure of your Sitemap based on this schema. You can find a list of XML-related tools at each of the following locations:

In order to validate your Sitemap file against a schema, the XML file will need additional headers as shown below.

XML

<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
         http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
         xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
   <url>
      ...
   </url>
</urlset>
Leave a comment »

Sitemap index validation

  04/08/07 01:07, by , Categories: Specs

The following XML schema defines the elements and attributes that can appear in your Sitemap index file. You can download this schema from the link below:

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

There are a number of tools available to help you validate the structure of your Sitemap based on this schema. You can find a list of XML-related tools at each of the following locations:

* http://www.w3.org/XML/Schema#Tools
* http://www.xml.com/pub/a/2000/12/13/schematools.html

In order to validate your Sitemap index file against a schema, the XML file will need additional headers as shown below.

XML

<?xml version='1.0' encoding='UTF-8'?>
<sitemapindex xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
         http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd"
         xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
   <sitemap>
      ...
   </sitemap>
</sitemapindex>
Leave a comment »

Sitemap extensions

  04/08/07 01:10, by , Categories: Specs

You can extend the Sitemaps protocol using your own namespace. Simply specify this namespace in the root element. For example:

XML

<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
         http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
         xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
         xmlns:example="http://www.example.com/schemas/example_schema"> <!−− namespace extension −−>
   <url>
      <example:example_tag>
         ...
      </example:example_tag>
      ...
   </url>
</urlset>
Leave a comment »

Informing search engine crawlers

  04/08/07 01:12, by , Categories: Specs

Once you have created the Sitemap file and placed it on your webserver, you need to inform the search engines that support this protocol of its location by submitting it to them via the search engine's submission interface or an HTTP request.

Google and Ask has also announced they will now find the sitemap if you declare it in robots.txt like this:

Code

Sitemap: http://www.mysite.com/sitemap.xml

The search engines can then retrieve your Sitemap and make the URLs available to their crawlers.

Leave a comment »

::