Working on FIW.ME!

We are currently working on fiw.me a next generation URL shortener!

Creating Google compatible XML sitemap

Creating Google compatible XML sitemap

You want to create a sitemap on your own? Which is compatible with the Google? Then I will show you how to code your xml sitemap for your site.
The rules for the sitemap is, it must begin with <urlset> and end with </urlset> and rest of all code goes with in it. Include url in <url> tag, the location is given in <loc> which is child of the <url>.

And there are optional tags available you can use like <lastmod>, <changefreq>, <priority>.You can use them if you want to or else you can just skip them.

Here is example code for sitemap.

<?xml version=”1.0″ encoding=”UTF-8″?>
<urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″>
<url>
<loc>http://www.example.com/</loc>
<lastmod>2005-01-01</lastmod>
<changefreq>monthly</changefreq>
<Priority>0.8</priority>

</url>
</urlset>
You can repeat the <url> for as many as links you want. Example:

<?xml version=”1.0″ encoding=”UTF-8″?>
<urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″>
<url>
<loc>http://www.example.com/</loc>
<lastmod>2005-01-01</lastmod>
<changefreq>monthly</changefreq>
<Priority>0.8</priority>

</url>
<url>
<loc>http://www.example.com/index.html</loc>
<lastmod>2005-01-01</lastmod>
<changefreq>monthly</changefreq>
<Priority>0.8</priority>

</url>
</urlset>

You do it for as many as links you want to. But remember the <loc> tag is compulsory and <lastmod>, <changefreq>, <Priority> are optional.

<lastmod> tag is used to define when was your page updated lately. The format must be YYYY-MM-DD.

<changefreq> this tag is used to define how frequently your site is updated. The values you can assign are

  • always
  • hourly
  • daily
  • weekly
  • monthly
  • yearly
  • never

<priority> This tag is used to let search engine know the importance of the link, It doesn’t decide the PageRank in search engine though. The values can be between 0.0 to 1.0. By default the value is 0.5.

Write the code , save it in xml page, Upload to the server and link it with the Google. Over, easy Isn’t it? Hope it helped you. Thank you.