Sitemap XML: The QuickStart Guide to Site Maps

Creating a sitemap.xml file for my web site sounded like a good idea. It should have been an easy task but surprisingly there was a lot to take in! I spent a couple of hours on Google reading the Sitemaps Protocol and running through the various options.

However when I found myself on the W3C page about XML Schema it looked like I was getting into the deep end. Why wasn’t there a simple explanation of what I needed to do?

If you are like me, you probably wish you could figure it out in 1 minute...

Well, now you can...

Rather than explain how it works, or create a script that you have to install I thought I'd show you how to create a Site Map for your web site the easy way...

Step 1: Cut and Paste

Cut and paste the code shown below into your text editor.

Step 2: Edit the 3rd line

Change "www.example.com" to your domain name. And change "index.html" to match the name of the file you use as your home page as required (e.g. index.htm, index.php, default.asp, etc)

Step 3: Save your file

Save your text file as "sitemap.xml".

Step 4: Upload to your web server

Transfer your file to your web server and put it in the top directory, alongside your home page.

Step 5: Tell Google

Sign into Google Sitemaps with your Google Account, click on "Add a Site" and type in the address of your site, and then click submit. Click continue, then on the heading Sitemaps with the >>, then on the Add/Test Sitemap button, then Submit Sitemap.

What Next

In a few hours time, Google will read the file on your web site. When you revisit your account area on Google it will tell you if there are any errors in your sitemap.xml file. If there are then have a look at the hints given in the Troubleshooting Guide. The commonest error is that each of your URLs must go on a new line. Check your FTP software is uploading in Text mode if you are sure your source file is okay.

Step 6:

Once you have a working sitemap.xml file on your web site and Google is happy reading it then go back to your text editor and duplicate Line 3 for each additional page on your web site. Edit as required to match the names of your pages and make sure each <url> ... </url> reference goes on a new line. Save. Upload.

The QuickStart Guide to Site Maps is only intended to get you going with the minimum requirements for a small web site. Include references to all the pages you would like indexed because Google will probably remove previously indexed pages if you fail to mention them. There are more options you can use in your site map and full details can be found in the XML Tag Definitions.

If you search the net you can find lots of emerging software that looks very promising. Some are also available with free trial periods such as the A1 Sitemap Generator, which can create text, HTML, RSS and XML sitemaps to help search engines like Google and Yahoo! to crawl and index your web site.

Sitemap Autodiscovery via robots.txt

The new open-format autodiscovery allows you to specify the location of your sitemap within the robots.txt file, eliminating the need to submit sitemaps to each search engine separately. It doesn't matter where you place it in your file and it is independent of User-agent. You can also link to your Sitemap Index if you have one.

Search Engines and Sitemap Pings

Several search engines have introduced a standardised support for Sitemap Pings. To submit your sitemap to a search engine (ping) use the following format:

Examples you can use include Bing and Google. Ask, Yahoo!, and MoreOver are discontinued.

For Weblogs you will also need to submit a site name:

n.b. for html validation you may need to encode your ampersand, using <&amp;> instead of <&>

Sitemaps with MediaWiki

An updated version of the GenerateSitemap extension is now available.

Thank you

If you found this guide useful I would be grateful if you could mention it on your web site or blog and link back to our home page. Thank you!

The QuickStart Guide to Site Maps - sitemapxml.co.uk

SitemapXML.co.uk

If you would like to buy SitemapXML.co.uk please see our listing on quotes.domains

Site Map XML Icon

I have created a small icon that you can use on your web site or blog. Please copy the graphic to your own server. You can use it to link to your own Site Map file, or for a link back to our web site.

Sitemap XML