Sie sind auf Seite 1von 3

Sitemap XML: The QuickStart Guide to Site Maps

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 Frequently Asked Questions. 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.
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url><loc>http://www.example.com/index.html</loc></url> </urlset>

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 Sitemap" and type in the address of your Sitemap, and then click submit.

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

http://www.sitemapxml.co.uk/[06/11/2010 07:30:57]

Sitemap XML: The QuickStart Guide to Site Maps

required to match the names of your pages and make sure each <url> ... </url> reference goes on a new line. Save. Upload.
1. <?xml version="1.0" encoding="UTF-8"?>

2. <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> 3. <url><loc>http://www.example.com/index.html</loc></url> 4. <url><loc>http://www.example.com/page2.html</loc></url> 5. <url><loc>http://www.example.com/page3.html</loc></url> 6. <url><loc>http://www.example.com/etc.html</loc></url> 7. </urlset>

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. Google also have a free script that can create a site map for your web site. Unfortunately it requires installation on a web server and looks more trouble than it is worth but 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.
1. User-agent: * 2. Disallow: 3. Disallow: /cgi-bin/ 5. 6.

4. Sitemap: http://www.example.com/sitemap.xml

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:
http://<search-engine-url>/ping?sitemap=http%3A%2F%2Fwww.example.com%2Fsitemap.xml

Examples you can use include Ask, Yahoo! and Google. For Bing (MSN) use Bing and MoreOver. For Weblogs you will also need to submit a site name:
http://rpc.weblogs.com/pingSiteForm?name=example&url=http%3A%2F%2Fwww.example.com%2Fsitemap.xml

http://www.sitemapxml.co.uk/[06/11/2010 07:30:57]

Sitemap XML: The QuickStart Guide to Site Maps

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

Sitemaps with MediaWiki


An updated version of the GoogleSitemap extension is now available. The ManualSitemap extension is suitable for MediaWiki versions 1.13+ and supports multiple sitemap pings.

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 - www.sitemapxml.co.uk

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

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.

http://www.sitemapxml.co.uk/[06/11/2010 07:30:57]

Das könnte Ihnen auch gefallen