Senserely Yours, we are an ad revenue community: you too can rely on AdSense!
Senserely.com is not sponsored by or directly affiliated with Google.

54. How to make valid Google Sitemaps?? (3.03.2007)

google | seo | sitemap | webcoding

Referral Link: http://www.senserely.com/referral/7777778a

For creating Google sitemaps for my websites I use the generator located at the Mypagerank site: http://www.mypagerank.net/google_sitemap_creator.html, and the one at the XML Sitemaps: http://www.xml-sitemaps.com.

However, since both generate a “sitemap.xml” file that is not valid (mostly it was incorrect syntax in the XML header) when processed with Google Sitemap Validator: http://www.validome.org/google, I need to “merge” them together to be valid in the end, i.e. I use some of the syntax from the “sitemap.xml” file generated on one site and some of the syntax from “sitemap.xml” file generated on the other site.

Incorrect syntax 1:

<?xml version="1.0" encoding="UTF-8" ?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
<url>

Incorrect syntax 2:

<?xml version="1.0" encoding="UTF-8"?>
<urlset
      xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
      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/09/sitemap.xsd">
<url>

The correct syntax:

<?xml version="1.0" encoding="UTF-8" ?>
<urlset
      xmlns="http://www.google.com/schemas/sitemap/0.84"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">
<url>

P.S. - For even more details see the “Why two generators make totally different Sitemaps??” thread: http://forums.digitalpoint.com/showthread.php?t=187420 that I opened here on Digital Point forums.

Ivan Tadej (user: “tayiper”)

Referral Link: http://www.senserely.com/referral/7777778a

Hey man, thanks a bunch!!

Hey mate, thank you very much for the nice words!!

Ivan Tadej (user: “tayiper”)

Referral Link: http://www.senserely.com/referral/7777778

eXTReMe Tracker