What Is A Sitemap – Uses & Types For SEO

Inorder to help search engines discover your pages better is by providing them a document containing all the website’s pages.

This document (or page) is called a Sitemap.

Do I need a Sitemap?

A sitemap makes search engines discover your pages easily. Typically, when you submit your site to search engines the search bots can discover your pages automatically as they crawl through your website. They discover pages from other pages that link to them.

However, some orphaned  pages may not get discovered and indexed. This is where sitemaps come in hand to make sure search bots discover all your pages – even buried pages.

Small websites with few pages may not need a sitemap, however, it doesn’t hurt to have one as it makes page discovery easy.

How to create a sitemap

There are basically two common sitemaps, XML sitemaps, Text based, and HTML Sitemaps

XML sitemaps

XML sitemaps are the most common type of Sitemaps. XML is a markup language used for data storage. It is similar to HTML, but uses custom tags instead of predefined ones.

Here’s an example XML sitemap:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://www.example.com/foo.html</loc>
    <lastmod>2022-06-04</lastmod>
  </url>
</urlset>

You can create XML sitemaps using the XML sitemap online generator.

Enter your website URL and click start. The tool will crawl your site and generate an XML sitemap file with all page URLs. Click view sitemap details and download the file.

xml sitemap generator online

Upload the sitemap file in the root folder of your site.

Using Yoast

If you are using WordPress there are plugins like Yoast & AIOS that generate sitemaps for you automatically.

Install and activate the Yoast plugin. In the dashboard go to Settings under Yoast SEO. Go to the XML sitemap card under APIs and click enable feature.

Image source, Yoast

Click View Sitemap and a page will open up with different sitemaps for pages, posts and taxonomies. Copy the end of the URL and paste in Search console. You can add all the given sitemaps.

Text based

text file sitemap
text file sitemap

Text based sitemaps are the easiest to create. You create a .txt file with a list of URLs like so:

Don’t put anything except URLs in the file.

HTML Sitemaps

HTML sitemaps are good for SEO and user navigation as well – you hit two birds with one stone.

List all page links in an HTML document (page). You can group pages by category, parent-child relationship, or using alphabets. Here’s an example:

Once you have the page with all pages, you can link to it from all the other pages on the site. Typically, the link to the HTML sitemap page is placed in the footer

Amazon business footer
Amazon business sitemap link in footer

You can create HTML sitemaps  using online tools like the XML Sitemap generator above. In the Sitemap results scroll down and download the zip file with all sitemap files included.

Extract the zip file, copy the sitemap.html and upload it to your site root folder -which is more convenient. Create a link to the sitemap file and reference it on your website, e.g in the footer.

Using a HTML Sitemap Plugin

If you’re on WordPress you can create HTML sitemaps hustle free. Install and activate Simple Sitemap. Go to Sitemaps and settings. Scroll down and

Submitting a Sitemap to Google

Google can discover your URLs automatically but you can help it access them faster by submitting a sitemap. Go to Search Console. If you don’t have an account create one here,

Go to the Sitemaps and add the sitemap path, If your sitemap is in the root folder you just add the sitemap file name like below:

google search console sitemap

Sitemaps best practices

  • Put Sitemaps in the root directory
  • Avoid blocking crawling of the Sitemap file
  • Avoid large sitemap files. Sitemaps have max size of 50mb
  • Encode your sitemaps
  • Use absolute URLs

Further Reading

Build and submit a sitemap, Google