Every website is a collection of pages: a homepage, a few service pages, a blog, a contact page. Each one lives at its own address, and visitors and search engines alike need a way to find them all. A sitemap is the document that lists those pages in one place, in an organised order, so that nothing important gets lost.

Think of a website as a building. The homepage is the front door, the main navigation is the hallway, and each page is a room. Without a map, a visitor can still wander around and find most of the rooms, but the ones tucked away at the end of a corridor are easy to miss. A sitemap is the floor plan pinned beside the door. It shows the whole building at a glance: which rooms exist and how they connect.

What a sitemap does

A sitemap serves two audiences at once. The first is people. A human-readable sitemap gives visitors a plain list of a site’s pages, grouped by section, so they can jump straight to what they need instead of clicking through menu after menu. It is especially useful on large sites, where the main navigation can only show a handful of links and the rest of the pages sit one or two clicks deeper.

The second audience is search engines. They send out crawlers, small programs that follow links from page to page and record what they find. A machine-readable sitemap hands those crawlers a complete list of pages to visit, including pages with few links pointing to them, pages added recently, and pages buried deep inside the site. It does not guarantee that every listed page will appear in search results, but it makes it much more likely the crawler will find the page in the first place.

For a small site with a handful of pages, a sitemap may feel unnecessary. But as soon as a site grows, the map starts to earn its keep: new pages, archived pages, and pages reached only through a search box are all easier to discover when listed in one place.

A person sitting at a desk in a dark room looking at a glowing blank computer screen beside a single red desk lamp

The kinds of sitemap you will meet

There are two main kinds of sitemap, and they look very different even though they do the same basic job. The first is the XML sitemap. It is a file written in a structured format that machines can read, and it usually lives at an address like yoursite.com/sitemap.xml. Visitors rarely see it, because it is written for crawlers rather than people. It lists each page address and the date it was last changed.

The second is the HTML sitemap. This is an ordinary web page that a person can read, usually linked from the footer of a site. It lists the main sections of the site and the pages inside them, with short, plain labels. It works like a table of contents for the whole website, and it helps visitors who prefer to scan a list rather than work through menus.

There are also specialised versions. An image sitemap lists a site’s images, a video sitemap does the same for video, and a news sitemap covers articles published in the last couple of days. You do not need all of these. A small site can get by with a single ordinary XML sitemap, and a mobile website design that keeps its pages simple will often need nothing more.

A dark curved hallway with several open doorways and a single glowing red rectangle at the far end

How to make one that works

Making a sitemap has three steps: gather the pages, organise them, and publish the file. Start by gathering every page that should be listed. Look at the site itself: the navigation, the footer, the blog archive, and any search results for the site. A content management system or a website builder will often generate a sitemap automatically from the pages it knows about, which covers most of the list at once.

Next, organise the pages into groups that make sense. The homepage comes first, then the main sections, then the pages inside each section. A visitor reading the HTML version should be able to follow the structure without thinking about it, and a crawler reading the XML version benefits from the same order. Keep the labels short and plain, using the same words the site itself uses for those pages.

Then publish the file and tell the search engines where it is. For an XML sitemap, place the file at a predictable address, usually sitemap.xml in the root of the site, and submit that address through the search engine’s webmaster tools. It also helps to mention the sitemap in the site’s robots file. For an HTML sitemap, publish it as an ordinary page and link to it from the footer.

The sitemap also needs to be easy to reach. A file on a slow or unreliable server will not do much good, which is one reason the web hosting behind a site matters more than it first seems.

Common mistakes to avoid

The most common mistake is letting a sitemap go stale. A site changes every week, but the map is only updated once a year, and the two slowly drift apart. Pages that no longer exist stay on the list, new pages never appear, and the crawler learns to trust the map less. The fix is simple: make updating the sitemap part of publishing a page, not a separate chore to be remembered later.

The second mistake is listing pages that should not be found: admin pages, thank-you pages after a form is submitted, test pages, and duplicate versions of the same content. Each one wastes a crawler’s attention and can confuse visitors who stumble onto a page that was never meant for them.

The third mistake is building the map and then forgetting the rest of the site. A sitemap helps crawlers find pages, but it does not replace good internal links. Pages still need to link to each other in a way that makes sense, so a visitor reading one page can reach the next one naturally. The structure of the site itself should be sound first, and the map should describe that structure, which is why the web design process and the sitemap belong together: one builds the building, the other draws the plan.

Two hands arranging blank white cards in a branching layout on a dark table next to a single red pen

A simple check before you finish

Before you call a sitemap done, run through a short check. Does it include every important page and leave out the pages that should stay hidden? Does every address on the list load a real, working page? Does the date beside each page look right? And does the map agree with the site itself?

If the answer to all four questions is yes, the sitemap is doing its job. It is not a glamorous part of running a website, and visitors will rarely notice it, but it quietly makes the whole site easier to use and easier to find. With a map, nobody has to guess where things are, and nothing important stays hidden at the end of an unmarked corridor.

Back to the journalDiscuss a project