Sub topic 11
Shape the site hierarchy from the map
This chapter assumes you have a keyword map with one primary keyword per page, and that you can read URLs, categories, and internal links. It covers how to turn that map into a site hierarchy, which is the tree of parent and child pages.
Why the map should drive the hierarchy
A keyword map shows which topics are broad and which are narrow. A broad topic such as "running shoes" has narrower topics under it, such as "trail running shoes" or "how to choose running shoes". Those relationships are the hierarchy. If you build the site structure first and fit keywords in afterward, you often get pages with no clear parent, or two pages that compete for one topic.
A good hierarchy does three things:
- It puts broad, high-value topics near the top and specific ones below.
- It gives every page one clear parent.
- It keeps important pages within a few clicks of the home page.
Step 1: Find the parent of each cluster
Look at your clusters and ask which cluster is the broader version of another. The broad one becomes the parent. A parent keyword usually has more volume, a more general meaning, and a commercial or overview intent. A child keyword adds a qualifier such as a type, a use, or a question.
Add two columns to your map: parent_url and level. The home page is level 0, and its direct children are level 1.
url,page_type,primary_keyword,parent_url,level
/,home,running gear store,,0
/running-shoes/,category,running shoes,/,1
/running-shoes/trail/,category,trail running shoes,/running-shoes/,2
/blog/how-to-choose-running-shoes/,article,how to choose running shoes,/running-shoes/,2Step 2: Check the hierarchy for problems
You can check the tree with a short script. It reports pages whose parent is missing from the map, and pages that sit deeper than you want.
import csv
MAX_LEVEL = 3
with open("keyword_map.csv", newline="", encoding="utf-8") as f:
rows = list(csv.DictReader(f))
known = {row["url"] for row in rows}
for row in rows:
parent = row["parent_url"]
if row["level"] != "0" and parent not in known:
print(f"{row['url']} has an unknown parent: {parent!r}")
if int(row["level"]) > MAX_LEVEL:
print(f"{row['url']} is at level {row['level']}, deeper than {MAX_LEVEL}")Run this whenever you add planned pages. A planned page with no parent is a sign that a category page is missing.
Step 3: Align URLs with the tree
URLs do not have to mirror the hierarchy, but when they do, the structure is easier to read for people and for you. In the example, /running-shoes/trail/ sits under /running-shoes/. Avoid changing existing URLs only to make them match. A moved page needs a redirect, and it can lose rankings for a while. Prefer to fix the parent link and the navigation, and leave a stable URL alone.
Common errors
- A cluster with two parents. If a page fits under two categories, choose one parent for the hierarchy. Link to it from the other with a normal internal link.
- Too deep a tree. Pages four or five levels down are hard to reach. Flatten the tree by merging thin categories.
- Thin parents. A category page with only a list of links has little to rank for. Give each parent real copy that targets its primary keyword.
- A hierarchy that ignores intent. Do not place an informational article as the parent of a commercial category. Informational pages usually sit beside or below the category they support.
Exercise
Your map has "trail running shoes" and "waterproof trail running shoes" as separate pages. Which should be the parent, and which columns would you fill in to record it?
Show answer
"Trail running shoes" is the parent because it is the broader topic, and "waterproof trail running shoes" adds a qualifier. Set the narrower page's parent_url to the URL of the trail running shoes page, and set its level one deeper than the parent's level.