What is a sitemap and why your website should have one

As the name suggests, a sitemap is a map to a website. It’s designed specifically for search engines and should contain a list of all the pages on a website that should be available in search.

Search engines use sitemaps to help them identify key content on a website and interpret it more intelligently.

How to check whether your website has a sitemap

Sitemaps are usually found at the same location on all websites: website.co.uk/sitemap.xml. Depending on the website’s configuration, that sitemap.xml file may be an index listing further sitemaps. These could be grouped by content type, for example:

  • /sitemap_products.xml
  • /sitemap_pages.xml
  • /sitemap_images.xml

Your site may use either; one isn’t necessarily better than the other.

How your sitemap can help your site in search

Just having a sitemap usually isn’t good enough. You need to ensure that it is accurate, up to date and that search engines know about it.

An SEO audit (we do those!) can help you assess the quality of your website’s sitemap, checking that all important pages are included and that those which are not relevant to search, like terms and conditions pages, are excluded. An audit should also check whether the sitemap has been submitted to search engines, an important step that makes search engines aware of your website.

What is in a sitemap?

Since it’s designed for search engines (rather than users), sitemaps are written in Extensible Markup Language or XML. This means they’re not particularly nice to look at.

In its most simple form, a sitemap contains a list of a website’s important URLs, for example:

  • www.homepage.co.uk
  • www.homepage.co.uk/service
  • www.homepage.co.uk/about
  • www.homepage.co.uk/contact

But a sitemap will usually also include additional information associated with each page, like the last time the page was modified, how often the content changes and how important it is in relation to the rest of the website.

An XML sitemap with the additional information mentioned above will look like this:

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

<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>www.homepage.co.uk/</loc>

        <lastmod>2017-11-02</lastmod>

        <changefreq>daily</changefreq>

        <priority>0.1</priority>

    </url>

    <url>

        <loc>www.homepage/service.co.uk/</loc>

        <lastmod>2017-11-02</lastmod>

        <changefreq>weekly</changefreq>

        <priority>0.8</priority>

    </url>

</urlset>

How to make a sitemap

If your website consists of a few static pages, you could write the sitemap.xml file in a code editor, following the above format, and then simply upload it, placing it at yourdomain.co.uk/sitemap.xml.

This approach, however, is impractical for any sites with content that changes regularly. If your site has a news section, for example, you would have to modify your sitemap every time you add a new article. This becomes even more complicated for e-commerce sites with shops that have a frequently changing inventory.

Fortunately most content management systems have sitemap generators that will do the work for you. However, you’ll still want to conduct a regular audit of the sitemap to ensure it does not contain unwanted content and is serving your site in the best possible way.

User-facing sitemaps (just a bit of fun)

If you used the web in the 90s you may recall that many websites had user-facing sitemaps. These were presented like the “normal” Hypertext Markup Language (HTML) pages that make up a website and were designed to help users navigate websites.

You can use the Wayback Machine to travel back to 9 May 1998 and see how Apple.com incorporated a user-facing sitemap in its design. Here’s a screenshot:

Snapshots from the Wayback Machine show how Apple used a Site Map link on its home page (left, red) to take users to an index of their site (right). This was before fancy drop-down menus!

Modern websites can use drop-down menus, breadcrumbs and other user experience techniques to ensure visitors can find their way around on a page. As a result user-facing sitemaps like these are now a relic of the past and sitemaps are purely for search engines.

Photo by rawpixel.com on Unsplash.

Both Birds Logo