What is sitemap.xml and how does a XML sitemap look like?

Posted By: Riya Saini Published: 14, Jan 2024

What is sitemap.xml and how does a XML sitemap look like?


Wouldn't it be fantastic if you had frequent visitors who were satisfied with acquiring exactly the information they needed from your page if you own or manage a website, or if you plan to own one?


What is a sitemap?

A sitemap is a manner of arranging a website by identifying the URLs and information contained within each part. Previously, sitemaps were primarily intended for website visitors. Google's XML format, on the other hand, was created with search engines in mind, helping them to find the material more quickly and efficiently.


In response to the growing size and complexity of websites, Google created a new sitemap protocol. Business websites frequently had hundreds of goods, and the popularity of blogging prompted webmasters to update their content at least once a day, not to mention popular community-building tools like forums and message boards. As websites grew in size, search engines struggled to keep track of everything, occasionally "skipping" content as they cruised through these fast-changing pages.


Search engines might monitor URLs more efficiently using the XML standard, allowing them to optimize their searches by putting all of the information on one page. XML also remembers the last time any modifications were made and highlights how frequently a website is updated. XML sitemaps were not, despite their name, a search engine optimization tool. It has no effect on rankings, but it does allow search engines to perform more accurate searches and rankings. It accomplishes this by gathering the information that a search engine needs and storing it in one location—a very useful feature given the millions of web pages to look through.


Types of Sitemap:

Sitemaps are divided into two categories. While they serve different objectives, they are both suggested and will not harm your website.


(1) XML Sitemap: The most popular sort of sitemap is an XML Sitemap. It can only be recognized by search engines, hence it is dedicated solely to them. XML sitemaps are usually found in the domain's root folder.

E.g. www.example.com/sitemap.xml

An XML sitemap can have a maximum of 50,000 URLs and a file size of 50MB uncompressed. You'll need to distribute your URLs among many XML sitemaps if you go above either restriction. After that, the sitemaps can be merged into a single XML sitemap index file. All other sitemaps are linked to your sitemap index. For example, your sitemap index could have various sitemaps, such as a Blog Sitemap, a Product Sitemap, a Category Sitemap, and a Landing Pages Sitemap. Your image and video sitemaps can also be included.


(2) HTML Sitemap: The HTML sitemap is the second primary type. It can be viewed by website users and can assist them in navigating to a certain page, making it more useful from a user experience perspective. In most cases, HTML sitemaps are linked in the footer of a website.


Aside from these two basic sitemaps, there are three further sorts of sitemaps to consider:


  • Video Sitemap: Designed to assist search engines in better understanding your website's video content.
  • News Sitemap: This sitemap is used to help search engines identify the material on websites that have been approved for Google News. Include URLs of stories written within the recent two days for the best results.
  • Image Sitemap: This is used to assist search engines to find all of the images on your website.

Sitemaps XML format


Search engines, not people, are the target audience for XML sitemaps. If you've never seen one before, they can be intimidating.

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<url>
		<loc>https://ahrefs.com/</loc>
		<lastmod>2019-08-21T16:12:20+03:00</lastmod>
	</url>
	<url>
		<loc>https://ahrefs.com.com/blog/</loc>
		<lastmod>2019-07-31T07:56:12+03:00</lastmod>
	</url>
</urlset>

XML declaration

<?xml version="1.0" encoding="UTF-8"?>

This informs search engines that they are currently reading an XML file. It also specifies the XML version and character encoding. The version for sitemaps should be 1.0, and the encoding should be UTF-8.


URL set

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

This is a container for all of the sitemap's URLs. It also informs crawlers about the protocol standard that is in use. The Sitemap 0.90 standard is used by the majority of sitemaps, and it is endorsed by Google, Yahoo!, and Microsoft, and others.


URL

<url>
<loc>https://ahrefs.com/</loc>
<lastmod>2019-08-21T16:12:20+03:00</lastmod>
</url>

For each URL, this is the parent tag. In a nested tag, you must define the URL's location. These must be absolute canonical URLs, not relative ones.


There are a few optional characteristics here, despite the fact that this is the only mandatory tag:

  • <lastmod>: Indicates the last time the file was edited. This must be formatted in W3C Datetime. If you modified a post on October 27th, 2021, for example, the attribute would be 2021-10-27. The time can optionally be included, although it is not required.
  • <priority>: Indicates the URL's relative priority to all other URLs on the site. The range of values is 0.0 to 1.0. The higher the number, the more important it.
  • <changefreq>: Indicates how frequently the page will be updated. Its purpose is to inform search engines on how frequently they should crawl the URL. Always, hourly, daily, weekly, monthly, yearly, and never are valid values.

None of the optional tags are particularly useful in terms of SEO.



contact us

Get Free Professional Consultation

Corporate Address

Sultanpur, New Delhi 110030


Registered Address

Dinesh Vihar Meerut, 250002

hello@figmanetsolutions.com

Mon - Sat (9AM to 7PM)


Get in Touch

Let’s Discuss Your Project in Details


Let’s explore your project in detail, focusing on key elements like goals, audience, features, and timelines to set you up for success.