What is a sitemap

What is a sitemap? How to create one?

A sitemap or site map is simply the listing of all available web pages on your website. It is meant for the users and for the search engines depending upon the type of the sitemap. Creating a sitemap for a website has always been one of the best practices of web design.

There are basically two types of sitemaps –

  • HTML Sitemap (Meant for the website users)
  • XML Sitemap (Meant for the search engines . Eg. Google/Bing)

HTML Sitemap

An HTML sitemap is simply a collection of hyperlinks in a structured way that tells a user what pages are available and where he/she find the specific link. This type of sitemap is essentially a webpage that the users can see in the browser (just like any other webpage). Many websites include a webpage that behaves like an HTML sitemap which allows the users to visit the website’s contents with ease. Having an HTML sitemap is simply for the sake of the users (So that they can navigate easily to all of the content).

XML Sitemap

An XML sitemap is meant for search engines and is very different from an HTML sitemap. It is a file containing links to various web pages in the format of an XML file. If you own a website, you should create a sitemap and upload it to the google search console (In case you create it for google search engine). You can however put your sitemap on other search engine’s consoles as well. An XML sitemap is of utmost importance to your website. A well-structured sitemap can make your website searched by search engines. It enables the web crawling bots to analyze what content you offer in your web pages, how many pages there are, and how often your web pages are being updated.

You can create a single XML sitemap or multiple sitemaps depending upon the complexity of your website. The maximum URL limit per sitemap is 50,000, however many webmasters put a maximum of 1000 URLs per sitemap to avoid speed reduction. Large websites often contain multiple sitemaps. For example, for this website, I have generated separate sitemaps for static pages (like about us, contact us, the home page, disclaimer, etc), for tutorials, for programs, for posts.

There are two types of XML sitemaps –

Index Sitemap – This is a sitemap that contains the URLs of other sitemaps (In case you own multiple sitemaps).

URL Sitemap – It is a normal XML sitemap containing URLs to different pages.

Video sitemap – Contains the URLs to all of the videos available on your website and is used by the search engine to understand the video content on your website.

Image sitemap – It contains the URLs (or path of location) of different images that are present on your website.

Why Having a sitemap is so important?

Having an XML sitemap is not mandatory but a must practice if you want to rank your website. There are so many benefits of having a sitemap. A sitemap can inform the search engines immediately after you make any changes to a particular webpage. The XML sitemaps are meant to be used by search engines. The search engines use your sitemaps to read different pages on your website.

If your sitemap/sitemaps is/are having all the links of your web pages and follow the standard format, there are good chances that your website would rank well in search engine results pages (SERP).

How to make and submit a sitemap?

If you are using WordPress to build a website, the good news is that there a bunch of plugins to do this. You only need to install and activate the plugin, and it will make the sitemaps and submit them to the google search console. Some popular sitemap generator plugins available in WordPress are Yoast SEO, All in one SEO pack, Google XML Sitemaps, etc. Some of them are paid and some of them are free to use. You can purchase the premium version of a plugin to use some advanced features.

If you have made your application without using WordPress and want to create the sitemaps on your own, then you first need to understand what an XML file is. An XML sitemap follows a particular format.

You can build your sitemap online by visiting https://www.xml-sitemaps.com/. There you only need to provide your site URL and within minutes your sitemap would be ready.

If you still wish to create multiple sitemaps for different categories, you can use the following formats –

Format for creating index sitemap –

<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://example.com/posts-sitemap.xml</loc>
	</sitemap>
	<sitemap>
		<loc>https://example.com/pages-sitemap.xml</loc>
	</sitemap>

	<sitemap>
		<loc>https://example.com/news-sitemap.xml</loc>
	</sitemap>

	<sitemap>
		<loc>https://example.com/videos-sitemap.xml</loc>
	</sitemap>
</sitemapindex>

Format for creating a URL sitemap – For example, there is a sitemap containing all the blog posts,
it would look something like this.

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<url>
		<priority>0.7</priority>
		<loc>https://example.com/post/post-one</loc>
	</url>
	<url>
		<priority>0.7</priority>
		<loc>https://example.com/post/post-two</loc>
	</url>
	<url>
		<priority>0.7</priority>
		<loc>https://example.com/post/post-three</loc>
	</url>
	<url>
		<priority>0.7</priority>
		<loc>https://example.com/post/post-four</loc>
	</url>
	<url>
		<priority>0.7</priority>
		<loc>https://example.com/post/post-five</loc>
	</url>
</urlset>

Note: A URL sitemap is a collection of URLs whereas an index sitemap is a collection of path locations of different URL sitemaps.

Submitting a sitemap/sitemaps to google search console

  • First, you need to have a google account. If you have a google account, sign in to the google search console with your Google account id and password. If you do not have a Google account, first sign up to google and then sign in to the Google search console.
  • There you need to give your website’s URL. After that go to sitemaps from the menu on the left.
  • Under the add new sitemap option, write the name of your sitemap and click submit.
  • If you receive any error, check that the format of your sitemap is correct up to the standard. Also, check that the file extension of your XML sitemap should be .xml.
  • If there is no error, your sitemap would be uploaded successfully.

Things to remember

  • Always keep your sitemap to the root directory of your website.
  • You can submit as many sitemaps or single sitemaps. Also, you can submit the URLs of individual pages if you wish.