A simple guide to XML sitemaps

4 minute read
In this article:

A sitemap is a useful tool to have when it comes to designing a website, adding new pages, or redesigning the layout entirely. Sitemaps work in a similar way to floorplans and they can have great benefits to SEO by defining the site’s navigation system to help you avoid making critical internal linking issues.

While there’s no guarantee of SEO success, sitemaps certainly increase the chances of your site getting crawled and indexed by search engines. But, despite the benefits, many companies don’t have an XML sitemap in place. So, here’s a guide to what XML sitemaps actually are and how to implement them.

What is a sitemap?

An XML sitemap (in technical terms, an Extensible Markup Language Sitemap), is a text file which is used to detail the URLs on your site, as well as metadata on each URL such as when it was last updated and how crucial they are to the structure of the site. This information helps search engines to crawl the site more efficiently and keeps them up to date on any new information about the website, such as when a new page is added or if another is removed.

There are four main types of XML sitemap, each one focusing on a different type of media that you may have on your site:

🖼️ Image sitemaps detail the structure of a site’s image content, helping it to rank well in Google’s image results.
🎥 Video sitemaps classify the video media which not only helps it rank well in Google video results, but also for rich snippets in organic results.
📰 News sitemaps describe the website’s news content for indexing in Google’s news search results.
📱 Mobile sitemaps optimise the web content for mobile browsing on phones that don’t use native web browsers.

How to create an XML sitemap

When you’re creating a sitemap, there are a few things to bear in mind. The key factor to remember is that there are some limits on size, the number of URLs you can include and the format the URLs need to be in.

Each sitemap needs to contain no more than 50,000 URLs, and the size of the file as a whole should not exceed 50MB in an uncompressed format. Don’t try to reach the limit though – break your sitemap down into smaller sitemaps so that it reduces the risk of potential issues with multiple requests to your sitemap. Make sure to remove any 301s, noindex or 404 URLs from the list – if a search engine crawls the URLs and views one with a noindex tag, it’s a waste of time as you’ve already told the search engine that you don’t want the page to be indexed.

If necessary, you can use a sitemap index file to organise multiple sitemaps, which allows for just one sitemap URL to be submitted to Google. You also want to ensure that only canonical URLs are included and that your preferred URLs contain the full domain. Finally, check the format of the URLs – they need to be properly formatted and escaped if certain characters are used.

🤔 Need more info on website architecture? Check out our quick guide to website architecture.

Begin the planning process

Firstly, gather the teams that need to be involved in the sitemap creation process – this typically involves marketing, developers, your IT team or whoever controls the servers, and the legal team. The marketing team are usually the ones responsible for how the site is structured, so they will play an important role in creating the visual sitemap for everyone else to work from.

From here, developers and the IT team can then build an XML sitemap file based on this structure, getting it on the server. Finally, you can run the sitemap past the legal team to ensure everything on the site is legally accurate, as you don’t want copyright restrictions passing through the sitemap.

Research search engine requirements

In addition to thinking about your target audience and what the goals of the website are, you also need to understand what the specific requirements of each search engine are. You don’t want to break the path of a visitor going from the search engine to your website and while each search engine has fairly similar rules, it’s worth checking up on them just to be sure.

Define the navigation structure

Shallow websites where there are three or fewer clicks to reach a page perform better in terms of SEO, so the structure of your site is vital. Plan out what you want your homepage to link to and allow your sitemap to grow from there. If you need inspiration, check out how high-traffic websites in your industry structure their sites to get an idea of how the sitemap should look for yours. After planning out the foundations, you can then define second and third-level content, such as your hiring page or the team page. This varies from company to company, and depending on how complex your website is, you may only require two levels or as many as four.

Write the XML sitemap and submit

Once the planning is done, it’s time to actually start work on the technical side of creating the XML sitemap – this is where the technical team and IT come into play. When the sitemap has been created, it needs to be put on the web server and submitted to each individual search engine. Websites aren’t static entities, so unless you’re using a platform that automatically updates your sitemap, you will need to go in and manually make adjustments to the file whenever you have a significant redesign or make big changes to the site.

Final notes

If they’re done right, XML sitemaps can be great for helping search engines to find, crawl and index your site much quicker. Ensure you’ve properly formatted the sitemap before you submit it in order to reap the rewards of:

✅ No longer needing to heavily rely on linking to get your pages crawled
✅ Helping search engines to see when new or updated pages go live
✅ Ensuring bots can crawl more efficiently with regards to the metadata they’re provided with
✅ Enabling search engines to find the key information on your site about media such as images and videos, which are inaccessible to crawlers

Subscribe for more articles like this!

Subscribe for more marketing expertise