Sitemap.xml file creation process:

What is sitemap.xml?

Sitemap.xml is a kind of XML file that contains some URLs and related information wrapped with XML tag. Sitemap is used by search engine bots only. It provides information and invitation to search engine to crewel those pages and index. In this post we will introduce you with different types of sitemap but we will discuss only about Sitemap.xml as details. This file has a great effect on On-Page SEO.   A new web site can be indexed easily within shortest possible time using this file because it helps a lot to index pages by search engine.

Introduction to various types of sitemap.xml files:

There are several types of sitemap we can use for getting better optimization result. Such as:

  • HTML sitemap: It is a HTML page that includes several anchor text displayed in the outline is linked to the page it references. It is designed for the visitors, known as human readable sitemap that is used for easier navigation process. Visitors can go there to know where to go for getting their needs.
  • Text sitemap: This sitemap is simply a text file. It contains All the URLs of a website. It was used by yahoo before XML sitemap format is discovered. Now it is not used anymore. But you can get all the URLs of your site in one place by using this file.
  • XML sitemap: That we are going to discuss as details.
  • Image sitemap: It includes all the images URL of a website that helps search engine to identify images of your site and index those. That is why visitors can find your images using search engine image search facility.
  • Video sitemap: It includes all the URLs of video files of a website.
  • News sitemap: Giant search engine Google also provide news services. If you want to share news with these site then you need to create a separate sitemap containing URLS that are shared with news services to index those shared pages.
  • Mobile sitemap: Now a days number of mobile internet users are huge so many webmasters are using additional mobile version of their site. In this case they may create a sitemap using mobile useable content URL only. It helps search engine to provide best search result for mobile devices.

NB: If you can understand creation and using process of XML sitemap then all other types of sitemap creation and using will be a easy task for you. So lets go.

How to create a sitemap.xml file?

To create it manually for your web site based on the Sitemap protocol, you need to do following task:

1. Create a text file using notepad or Dreamweaver or a text editor as you like and save it with a .xml extension. That is sitemap.xml.

2. Add the following code in the top of the file: Here you must use 1st 2 line as default. Second line starts with <urlset> tag that will be closed with <urlset> closing tag in the last stage of this file. You must write all the URLs that you are going to submit using this sitemap between these <urlset> and <urlset/> tag.

<?xml version="1.0" encoding="UTF-8"?> 
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

3. Now write following code just bellow above mentioned 2 lines:

<url>
<loc>http://www.leadaleader.com</loc>
 <lastmod>2013-05-12</lastmod>
 <changefreq>weekly</changefreq>
 <priority>1.0</priority>
 </url> 
<url>
<loc>http://www.leadaleader.com/blog/</loc>
 <lastmod>2013-05-12</lastmod>
 <changefreq>daily</changefreq>
 <priority>0.8</priority>
 </url>
  • Here <url> is starting tag of a particular URL and other data needed for sitemap creation process and </url> is the closing tag.
  • <loc> tag contains particular URL of your site and </loc> is the closing tag.
  • <lastmod> tag contains the period date when this page was last modified. You can define a date as you want, current date is recommended. It helps search engine to identify that this particular page needs to crewel again or not. And </lastmod> is the closing tag.
  • <changefreq> indicates how often your page content may be changed. You can use daily, weekly, monthly or yearly. And </changefreq> is the closing tag.
  • <priority> contains a manual priority value that indicates priority stage of a particular URL to search engine. Priority value starts from 0.0 to 1.0 where 0.0 indicates the least priority URL and 1.0 indicates highest priority URL. Default priority value is o.5. And </priority> is the closing tag of this line.

4. Finally use this line to close the sitemap coding process:

</urlset>

5. You need to save and upload this file in the root directory of your site where index file is situated. Mind it, sitemap URL must be like: http://example.com/sitemap.xml. Now your file is ready to submit.

Outlook of a complete sitemap:

<?xml version="1.0" encoding="UTF-8"?> 
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

<url>
<loc>http://www.leadaleader.com</loc>
 <lastmod>2013-05-12</lastmod>
 <changefreq>weekly</changefreq>
 <priority>1.0</priority>
 </url>
<url>
<loc>http://www.leadaleader.com/blog/</loc>
 <lastmod>2013-05-12</lastmod>
 <changefreq>daily</changefreq>
 <priority>0.8</priority>
 </url>

</urlset>

NB: You can repeat step 3 as much as needed to add different URL in your file. You can also create it using free sitemap generator software but you can make more control on your site by creating manual one.

 

Leave a Reply

Your email address will not be published. Required fields are marked *