What is a sitemap?
By Tom · Last reviewed · 3 minute read
A sitemap is a file or page that lists the important pages on your website, helping search engines like Google discover, crawl and index your content. There are two main types: XML sitemaps, which are files written for search engines, and HTML sitemaps, which are pages written for visitors.
On this page
XML sitemaps explained
XML sitemaps are the main way to tell search engines about your site's structure.
What is an XML sitemap?
An XML sitemap is a structured file written in XML (Extensible Markup Language) that lists the URLs on your website, with some optional extra information. Search engines like Google and Bing read this file to understand which pages exist on your site.
XML sitemap elements
| Element | What it means | Example |
|---|---|---|
<loc> |
The page's URL (required) | https://www.yoursite.co.uk/services/ |
<lastmod> |
The date the page was last changed | 2024-01-15 |
<changefreq> |
How often the page usually changes | monthly, weekly, daily |
<priority> |
How important the page is relative to your other pages (0.0 to 1.0) | 0.8 |
Google has said it uses <lastmod> when it's kept accurate, but ignores <changefreq> and <priority>, so don't spend time fine-tuning those.
Where to put your XML sitemap
Your XML sitemap should sit at the root of your domain, usually at yoursite.co.uk/sitemap.xml. You can also point to it from your robots.txt file by adding a line like Sitemap: https://yoursite.co.uk/sitemap.xml, which helps search engines find it automatically.
HTML sitemaps for visitors
HTML sitemaps help people find their way around your website when they can't find what they need.
What is an HTML sitemap?
An HTML sitemap is a page on your site that shows a structured list of links to all your important pages. Unlike an XML sitemap, it's written for people, not search engine bots.
You've probably seen these on larger websites. They're usually linked from the footer and give a bird's-eye view of the whole site. This site has one: see the sitemap page.
Benefits of HTML sitemaps
- Helps visitors find pages that aren't in the main navigation
- Makes the site easier to use with a screen reader
- Adds internal links, which can help SEO
- Shows your whole site structure at a glance
- A useful fallback when the search box doesn't help
How to create a sitemap
How you create one depends on your platform. None of these need much technical skill.
| Method | How it works | Best for | Difficulty |
|---|---|---|---|
| WordPress plugins | Yoast SEO, Rank Math or All in One SEO generate and maintain your sitemap automatically | WordPress websites | Easy |
| Online generators | Tools like XML-Sitemaps.com crawl your site and create a sitemap you can download | Small static websites | Easy |
| Screaming Frog | A professional SEO tool that crawls your site and exports complete sitemaps | Larger websites, SEO professionals | Intermediate |
| Built into the platform | Squarespace, Wix and Shopify create sitemaps automatically | Website builder platforms | Automatic |
Submitting your sitemap to Google
Once you have a sitemap, submit it to Google Search Console so Google knows where it is.
- Sign in to Google Search Console. Go to search.google.com/search-console and sign in with your Google account. If you haven't already verified your website, you'll need to do that first.
- Select your property. Choose the website you want to submit a sitemap for from the property menu in the top left.
- Go to Sitemaps. In the left-hand menu, click 'Sitemaps' under 'Indexing'.
- Enter your sitemap address. In the 'Add a new sitemap' field, enter the path to your sitemap (for example, sitemap.xml). The full address is shown automatically.
- Click Submit. Google will fetch your sitemap and start processing it. You can check its status in the table below.
Tip: Also submit your sitemap to Bing Webmaster Tools, which covers Bing and Yahoo search results. The process is similar to Google Search Console.
Benefits of having a sitemap
What a sitemap that's kept up to date does for you:
- Faster indexing: new pages are found and indexed by Google more quickly, so they can appear in search results sooner.
- More efficient crawling: search engines can crawl your site more intelligently and focus on your important pages.
- Orphan pages get found: pages that aren't linked from your navigation or other pages can still be found and indexed.
- Errors get spotted: Google Search Console reports problems with the URLs in your sitemap, so you can find and fix them.
Every site I build comes with an XML sitemap that updates itself when content changes. For more on how search engines rank pages, see what SEO is.
Questions people ask
What is a sitemap?
A sitemap is a file or page that lists all the important pages on your website, helping search engines like Google discover, crawl and index your content more efficiently. There are two main types: XML sitemaps (machine-readable files for search engines) and HTML sitemaps (human-readable pages for visitors). Think of a sitemap as a map that guides search engines through your website, so no important pages are missed.
What is the difference between an XML sitemap and an HTML sitemap?
An XML sitemap is a machine-readable file designed for search engines. It lists URLs, optionally with extra information such as the date each page was last changed, and search engines use it to find and index pages efficiently. An HTML sitemap is a normal web page that lists links to all the important pages on your site, organised logically. HTML sitemaps help visitors find their way around, especially if they can't find what they're looking for through the main navigation.
Do I need a sitemap for my website?
Small websites with good internal linking may not strictly need one, but having a sitemap is strongly recommended for every site. Sitemaps are particularly important if your site has hundreds of pages, has orphan pages (pages not linked from anywhere else), uses a lot of images or video, has a complicated structure, or is new with few links from other websites. For UK small businesses, a sitemap helps Google find and index all your service pages and blog posts.
How do I create a sitemap for my website?
For WordPress sites, plugins like Yoast SEO or Rank Math generate and update your XML sitemap automatically. For other platforms, you can use an online sitemap generator like XML-Sitemaps.com, or Screaming Frog for larger sites. Most website builders, like Squarespace and Wix, create sitemaps automatically. If you have a custom-built website, your developer can set up a sitemap that updates itself whenever pages are added.
How do I submit my sitemap to Google?
Sign in to Google Search Console at search.google.com/search-console and select your website. Click 'Sitemaps' in the left-hand menu under 'Indexing'. Enter your sitemap address (usually sitemap.xml) in the 'Add a new sitemap' field and click 'Submit'. Google will then fetch and process your sitemap, and show you its status and any errors it finds.
How often should I update my sitemap?
Your sitemap should update automatically whenever you add, remove or significantly change pages. Most CMS platforms and SEO plugins handle this for you. If your sitemap is created by hand, update it whenever you publish new content or remove old pages. A single sitemap can hold up to 50,000 URLs and 50MB uncompressed; if you go over either limit, split it into several sitemaps listed in a sitemap index file.
What are common sitemap errors and how do I fix them?
Common sitemap errors include URLs that return 404 errors (remove deleted pages from your sitemap), URLs blocked by robots.txt (either unblock them or remove them from the sitemap), URLs that redirect (list the final address instead), a sitemap that can't be found (check the file exists and the address is correct), and invalid XML (check the file with an XML validator). Google Search Console shows you the specific errors in your sitemap.
Does a small business website need a sitemap?
Yes, even small business websites benefit from one. Google can often crawl a small site without it, but a sitemap helps all your important pages get found quickly, helps new pages get indexed sooner, and gives Google useful information about your content. For a UK small business, that means your service pages, contact page and blog posts are more likely to appear in search results promptly. Setting one up is free and usually takes minutes.
