Home > seo > sitemap

Sitemap formats, types, and guidelines on how to create a sitemap

Ask a Question

What is a Sitemap?

A sitemap is an HTML or XML file that provides information about web pages, images, videos on your site and their relationship.

Why it is important?

It is important because it provides valuable additional information to search engines like:

  • when the page was last updated
  • Important top-most priority pages
  • other language versions of a page if any
  • To improve the crawling of large and complex sites.

Who needs it?

  1. For large and complex sites with no proper inter-linking, there is a chance of crawlers overlooking some of the newly created or updated pages.
  2. If your site has a lot of rich media elements like videos, images and it is a google news approved site there is a chance of google taking additional information from your site and site pages when required.

How to build a Sitemap?

 First Choose one among the 3 google’s supported sitemap formats:

  • XML format
  • Text Format
  • RSS, mRSS, and Atom 1.0

Then You can create a sitemap using online sitemap generators like XML Sitemaps.com or you can create it manually by following the below-given XML sitemap code formats for webpages, images, news, and videos.

XML Sitemap code format:

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

2) RSS, mRSS, and Atom 1.0

RSS (Really simple syndication) file contains information about recent updates on a site.

Bloggers can submit RSS feed URLs as sitemaps. Bloggers can also provide mRSS (media RSS) URL to give information about video content on your site.

3) Text

You can submit a sitemap.txt (UTF-8 encoding) file provided with only URLs (one URL per line).

sitemap.txt format:


Site Map extensions for Video, Images, News Media types:

XML site map for images:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<image:caption>A picture list of email marketing tools </image:caption>
<image:geo_location>Hyderabad, India</image:geo_location>
<image:title>Email Marketing</image:title>

XML site map for videos

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<video:title>Tutorial on How to use Mozbar </video:title>
<video:description>In this tutorial, You will learn how to use mozbar to find important SEO metrics like DA, PA, DoFollow and NoFollow links.
<video:restriction relationship="allow">IE GB US CA</video:restriction>
<video:price currency="INR">1.99</video:price>
<video:uploader info="http://www.example.com/users/webmarketersguide">WebMarketersGuide

XML Sitemap for News 

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<news:name>The News Times</news:name>
<news:title>Core Algorithm Update </news:title>

Guidelines on how to create a Site Map:

  1. Size of site map and site map index file (with multiple sitemaps) should not be greater than 50MB and they should not contain more than 50,000 URLs.
  2. Specify the site map path in robots.txt file to remind search engines next time they crawl robots.txt file.
             Sitemap: https://example.com/my_sitemap.xml

3. If your site is large site then you can create a sitemap index file (parent) with all the child sitemaps included as mentioned in the below format and submit it in search console.     

Sample code of site map index file:

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

  • Provide complete URL address with (www or non-www).
  • child site maps that are referenced in the parent sitemap index file must be in the same directory of site map index file or in the lower path.

Example: for the below site map index file

https://example.com/sitemap/sitemap_index.xml (parent)

the child sitemaps location can be https://example.com/sitemap/child/..