| May |
| 29 |
How to Create an XML Sitemap?
Creating a web page is not an easy task. You need to spend a lot of time in planning the look and feel of the website before actually developing it. If we consider the user’s perspective, visible operational elements are counted as other important parts of the planning. Front-end elements like a sitemap are very much related to the working of the website.
Sitemaps are always complex even if the structure of the web page is very simple. You can create a sitemap in XML or HTML. The XML sitemaps are meant for search engine spiders whereas HTML is for users. These maps have dual advantages – they make on-site navigation easier and also help you in communicating with search engines.
It is essential for every website to have an up-to-date sitemap.xml file, which ensures that all the pages listed on search engines have the latest content. Another benefit of having an XML sitemap is that SiteScan uses the file to generate a list of pages for Google Analytics code.
Creating an XML Sitemap Via Sitemap Generator Tools
The are a number of free tools that will generate sitemap.xml file for your website. In case your site has many pages nothing can be more time saving than this. If the site is smaller with a few dozen or less pages it is always better to create the file manually as the tool does not always find 100% of the site pages.
If you are looking for a good and less complicated online tool, refer to http://www.xml-sitemaps.com/
The tool has a 500-page limit and only works for websites that are already online. Google also has one offline tool for sitemap generation that runs on Python scripts. Here’s the link:
http://code.google.com/p/sitemap-generators/
Creating an XML Sitemap Manually
If you want to create a sitemap manually here are the steps to be followed:
- Create a plain text file and name it as “sitemap.xml”.
- Add the following line at the top of the file’s first line – <?xml version=’1.0′ encoding=’UTF-8′?>
This will show that the type of file is XML.
On the second line add – <urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″>
With this, web crawlers will know that this is a sitemap file.
- If you want every page of the site to appear in search engine results list all the pages in the following manner:
<url>
<loc>http://www.yoursite.com/</loc>
<lastmod>2008-08-17</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
- It is necessary to put the full URL (hostname + path + page) in the <loc></loc> tags
The <priority>, <lastmod> and <changefreq> fields are optional. If you want a better control over how often the web pages will be updated in search results, fill them up.
The <lastmod> field tells the date on which the page was last modified. In this way crawlers will know if there is any update on the page since they last crawled it. You can either use “yyyy-mm-dd” date format or W3C Date time format.
The <changefreq> field tells an approximate number of times the page is updated and thus, giving an idea on how often crawlers can visit the page to get an up-to-date data. You can use values like always, never, hourly, weekly, daily, yearly or monthly.
The <priority> field determines the value of importance of certain pages on a site in comparison to others. This makes the crawlers know which pages to crawl first. The value may be between 0.0 and 1.0. 0.5 is the default value.
One should know that these optional fields are just recommendations and not commands. If you forget to update the last modified field, crawler will still go through it, although the step might take slightly longer time.
- The next step is to enclose all these fields in the <url></url> tags.
- After you have created a <url> entry for the pages you wish to be indexed you have to end every file with the </urlset> tag.
- You must know that sitemaps have a limit of 50,000 pages. If the website has more pages than the determined number, you will have to make multiple sitemap files.
- The last step is to check if the xml file is properly UTF-8 encoded. This ensures that the file can be properly parsed.
How to View a Complete Sitemap.xml File?
After you have made the sitemap.xml file you have to upload it to the root directory of the website. It is the location of your sitemap.xml file that determines the pages to be listed in it. By placing the xml file in the root directory it becomes easier for you to add any page on the site to it.
The web crawlers visiting the site will first see the sitemap file and find out the pages to visit. If you want the crawlers to visit the pages as soon as possible, read the article about adding the sitemap to Google Webmaster tools. This will make your site be crawled within a few days.
You can get more details about XML sitemap files by reading the official documentations.


August 8th, 2010 at 10:08 am
[...] resztę artykułu: How to Create an XML Sitemap? | Pear Logic SEO Chicago Tags: benefit, essential-for, every-website, file, have-the, have-the-latest, latest, [...]