Sub topic 10
Draw the sitemap
This chapter assumes you have already chosen an organization scheme, shaped a hierarchy, and written labels for your top-level and second-level items. Here you turn those decisions into a sitemap that your team can review, test, and build from.
What a sitemap is for
A sitemap is a diagram or outline of every page or screen in a product and how they nest under each other. It is the main working document of an information architecture (IA). Designers use it to check structure. Developers use it to plan routes. Content owners use it to see what they are responsible for.
Do not confuse it with two similar things:
- XML sitemap. A file for search engines that lists URLs. It has no hierarchy that people read. This chapter is not about it.
- User flow. A diagram of the steps one person takes to finish a task. A sitemap shows where content lives, not the path someone follows.
A sitemap answers three questions: what exists, what is grouped with what, and how deep each item sits.
Choose a format
You can draw the same structure in several forms. Pick the one that suits the stage of work and the audience.
| Format | Best for | Weakness |
|---|---|---|
| Indented outline | Early drafts, quick edits, comments in a document | Hard to see breadth at a glance |
| Tree diagram | Reviews with stakeholders, presentations | Becomes unreadable past roughly 100 nodes |
| Nested data (JSON or YAML) | Tree testing tools, build pipelines, version control | Not friendly for non-technical reviewers |
| Spreadsheet | Large sites, with columns for owner, status, and URL | No visual hierarchy |
Start with an outline. Move to a diagram when you need to discuss shape. Keep a data version when other tools must read the structure.
Write the sitemap as data
A nested tree is a precise way to record a sitemap. Each node has a name and, if it is not a leaf, a list of children. This example is a small help center with three top-level groups.
{
"name": "Acme Help Center",
"children": [
{
"name": "Getting started",
"children": [
{ "name": "Create an account" },
{ "name": "Set up your profile" }
]
},
{
"name": "Billing",
"children": [
{ "name": "Update payment method" },
{ "name": "Download invoices" }
]
},
{
"name": "Account security",
"children": [
{ "name": "Reset your password" },
{ "name": "Turn on two-step verification" }
]
}
]
}Read the structure by its measurements:
- Depth is the number of levels from the root down to the deepest page. Here the tree has three levels: the root, the groups, and the pages.
- Breadth is the number of items at one level. Here the top level has three items and each group has two.
The tree is small, but it already shows the properties you want to check in any sitemap. Every page has exactly one parent. Labels at the same level are parallel in form. No group is much larger than its siblings.
Show the same tree as a diagram
A diagram makes the shape visible to people who do not read JSON.
Build the sitemap step by step
Work from the material you already have, not from a blank page.
- Start from the content inventory. Every page you plan to keep needs a place. Pages with no place expose gaps in the structure or content you should drop.
- Add the top level first. Use the labels you chose for global navigation. These become the main branches.
- Fill in the second level. Group pages using your organization scheme and your card sorting results. Keep related items together.
- Add deeper levels only where needed. Stop when a page is a single destination, not a group of further destinations.
- Check balance. Count the children under each node. A branch with 3 items next to a branch with 40 suggests a split or a merge.
- Mark non-hierarchical items. Utility pages such as sign-in, search results, and legal notices often belong outside the main tree. List them separately.
- Review against tasks. Pick five or six user tasks. For each one, trace the route from the root to the page that completes it. Count the steps.
Show relationships beyond parent and child
A tree shows one kind of relationship. Real products have more. Add these only when they affect decisions, and use different line styles or notes so the hierarchy stays readable.
- Cross-links. A page in one branch that links to a page in another, such as "Download invoices" linking to "Update payment method". Record these so the content team maintains both ends.
- Shared pages. One page that appears in two places. Decide which location is the canonical one. Showing the same page twice as separate nodes leads to duplicate content.
- Gated areas. Pages visible only after sign-in or only to some roles. Mark them with a label or a color so reviewers can see which audience reaches which branch.
- States and variants. A screen with an empty state and a filled state is still one node. Do not add a node for each state. Document states elsewhere.
Add information to each node
For a larger product, the label alone is not enough. Keep a table of attributes next to the diagram so the sitemap can run as a planning tool.
| Attribute | Why it helps |
|---|---|
| Page title and navigation label | Shows where the two differ and need review |
| Parent | Confirms there is exactly one primary location |
| Page type | Groups work by template, such as article, form, or list |
| Owner | Names who updates the page |
| Status | Marks pages as new, existing, moved, or retired |
| Intended URL | Prepares the next chapter's work |
When you plan a redesign, the status column is especially useful. It turns the sitemap into a checklist of what to build, move, merge, and delete.
Apps are not websites
An app sitemap follows the same logic with different containers. Screens replace pages, and the top level usually maps to a tab bar or a drawer menu rather than a horizontal header.
- Keep the top level short. Mobile tab bars comfortably hold three to five items, so your first level is limited by the interface, not only by the content.
- Show modal screens (a sheet or dialog opened over another screen) as children of the screen that opens them, and mark them as modal.
- Mark screens reached only by deep links, such as from a notification, so they are not mistaken for orphans.
Common errors
These problems appear again and again in sitemap reviews.
- Mixing levels of detail. One branch lists individual articles while another stops at a category. Decide how far down the sitemap goes and apply that rule everywhere.
- Labeling nodes with internal names. "Phase 2 landing" means nothing to users. Use the labels users will see.
- Drawing the org chart. Branches that mirror company departments reflect how the business is organized, not how people look for things. Check each branch against a user task.
- Duplicating a page to solve a disagreement. Two nodes for one page hide the real decision. Pick a home and cross-link from the other place.
- Treating the sitemap as final. A sitemap is a hypothesis until it passes testing. Mark it as a draft and plan to change it.
- Forgetting orphans. A page with no parent cannot be reached through navigation. List every page in the inventory and confirm each appears once.
Check the sitemap before you share it
A short checklist catches most issues:
- Every page in the inventory that you keep appears exactly once, or is marked as a cross-link.
- Every node has a clear label that matches your labeling rules.
- No path is deeper than your agreed limit, often three to four levels for a mid-sized site.
- Sibling groups are of comparable size, or you can explain why they are not.
- Utility pages and gated areas are marked.
- Each of your key tasks can be completed by following one clear route from the root.
You can automate parts of this. The script below reads a sitemap in the JSON format above and reports depth, the number of children for each node, and any duplicate labels.
import json
from collections import Counter
def walk(node, level=1, stats=None):
"""Collect depth, child counts, and labels from a nested sitemap."""
if stats is None:
stats = {"max_depth": 0, "children": {}, "labels": []}
stats["max_depth"] = max(stats["max_depth"], level)
stats["labels"].append(node["name"])
kids = node.get("children", [])
if kids:
stats["children"][node["name"]] = len(kids)
for kid in kids:
walk(kid, level + 1, stats)
return stats
sitemap = json.loads("""
{
"name": "Acme Help Center",
"children": [
{"name": "Getting started", "children": [
{"name": "Create an account"}, {"name": "Set up your profile"}]},
{"name": "Billing", "children": [
{"name": "Update payment method"}, {"name": "Download invoices"}]},
{"name": "Account security", "children": [
{"name": "Reset your password"},
{"name": "Turn on two-step verification"}]}
]
}
""")
stats = walk(sitemap)
print("Depth:", stats["max_depth"])
for name, count in stats["children"].items():
print(f"{name}: {count} children")
duplicates = [n for n, c in Counter(stats["labels"]).items() if c > 1]
print("Duplicate labels:", duplicates or "none")Running it prints a depth of 3, the child count for each group (3 for the root, 2 for each of the others), and "none" for duplicate labels. Duplicate labels are not always wrong, but each one deserves a look.
From sitemap to the next steps
The sitemap now connects to two later activities. The labels and nesting become the tree you test with real users, so keep the data version clean. The same hierarchy supplies the paths for your URLs, so the intended URL column can be filled in once labels are stable.
Exercise
A sitemap shows "Download invoices" under Billing and again under Account security, as two separate nodes. What is the problem, and what should you do?
Show answer
The same page has two parents, which suggests duplicate content and leaves it unclear which location is the main one. Choose one canonical home, based on where users would look first (here, most likely Billing). Keep a single node there and add a cross-link from the other branch, marked as a link and not as a second page.
Exercise
You draw a sitemap with one top-level group holding 38 pages and two others holding 4 pages each. Name two checks you would make and one possible change.
Show answer
Check whether the large group mixes several topics that users would separate (review card sorting results), and check whether its pages are one task type or several. A possible change is to split the group into two or three groups with clear labels, or to add a second level inside it, then re-check that no path becomes too deep.