Skip to main content

What is a sitemap?

A sitemap is a digital document that lists the pages of a website in a file format browsers can read, usually XML or HTML. It shows all pages and subpages of a site in a hierarchy, along with how they relate to each other and how they are connected through internal links. A sitemap is a simple way to tell search engines which pages are available to their crawler, which is why a correctly built sitemap supports search engine optimization.

Sitemap explained: an XML sitemap lists all pages of a website for search engines

How do I create a sitemap?

There are three ways to create a sitemap

1. Automatic generation by your CMS

Many content management systems have a function that generates sitemaps automatically. They usually add newly created pages to the sitemap on their own.

2. Manual creation

In principle, sitemaps can also be created by hand. To do that, create an .xml file that contains all the links and follows the structure below.

Example of a sitemap in XML format:

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">

<url>
<loc>https://taismo.de/en/what-is/</loc>
<lastmod>2021-05-19T19:39:19+00:00</lastmod>
<priority>0.85</priority>
<changefreq>monthly</changefreq>
</url>
<url>
<loc>https://taismo.de/en/what-is/sitemap/</loc>
<lastmod>2021-05-19T19:39:19+00:00</lastmod>
<priority>0.80</priority>
</url>
</urlset>

The following tags are mandatory:

  • urlset: Contains general information about the file and points to the standard of the protocol in use. Here, “0.9” refers to the version.
  • url: The primary tag of every entry.
  • loc: The address of the page, so its URL. It has to start with the protocol (http or https, for example).

The following entries are optional and add extra information:

  • lastmod: The date the page was last changed.
  • changefreq: How often the content is expected to change.
  • priority: Indicates the priority of the page for the crawler. Valid values are between 0.0 and 1.0.

3. Use a sitemap generator

Plenty of sitemap generators are available online. All you have to do is fill them with the links to every available subpage. They then output the source code or even the finished .xml file.

The finished sitemap should be stored in the root directory of your web server.

How do I tell search engines where my sitemap is?

Add the following line to your robots.txt file:
Sitemap: link to the sitemap

Example:
Sitemap: https://taismo.de/sitemap_index.xml

You can also submit the path to your sitemap to Google directly in the Google Search Console. You will find the option under:
Menu > Index > Sitemaps > Add a new sitemap

Whether search engines then really crawl and index those pages is a second question. An SEO audit checks exactly that, including how your crawl budget is spent, and the full SEO glossary covers the terms that connect to this one.

0%