Sub topic 12
Plan internal links from the map
This chapter assumes you already have a keyword map with one primary keyword per page, a page type, an intent label, and a status column. It also assumes you know what a URL, a category page, and an anchor text are. You will use the map to decide which pages should link to which, what anchor text to use, and how to check the result.
Why the map is the right source for links
Internal links do two jobs. They help visitors move to related pages, and they tell search engines which pages matter and what each page is about. Without a plan, links grow by accident. Writers link to whatever they remember, old pages collect links, and new pages get none.
The keyword map already holds the facts you need. Each row says what a page is about (primary keyword), what it is for (intent), and where it sits (page type and URL). A link plan is a second table derived from those rows.
Link rules you can derive from the map
Start with a small set of rules. Each one can be applied to the map without reading every page.
- Child to parent. Every page links up to the page that owns its broader topic. A trail running shoes category links to the running shoes category.
- Parent to child. A category links to its important children, so the hierarchy is crawlable and visible.
- Article to money page. An informational article links to the commercial page that answers the next step. An article on choosing running shoes links to the running shoes category.
- Sibling to sibling. Pages on closely related topics link to each other where a reader would plausibly want the other page.
- Never link to a planned page. Rows with status
plannedhave no URL to link to yet. Record the intended link and add it when the page is published.
Choose anchor text from the keyword
Anchor text is the visible, clickable text of a link. Search engines use it as a hint about the target page, so the primary keyword of the target page is a sensible starting point.
Do not use the same exact phrase every time. A natural link profile mixes forms. For a target whose primary keyword is trail running shoes, these all work:
trail running shoes(exact)shoes for trail running(variation)our trail range(descriptive)- a supporting keyword from the map, such as
off-road running shoes
Avoid generic anchors such as "click here" or "read more" on links you want to carry meaning. Avoid anchors that point to a different topic than the target page covers. If the anchor suggests topic A and the page is about topic B, the link confuses both readers and crawlers.
The supporting keywords in the map are a ready list of safe variations. Another reason to keep them current.
Build a link plan from the map
A link plan lists source page, target page, anchor text, and the rule that produced it. You can generate a first draft with a script, then edit it by hand.
The script below reads a keyword map with the columns from the earlier chapter. It adds a hierarchy column, parent_url, which the example CSV did not have. Add it to your map if you use this approach. The script skips planned pages and pages with no parent.
import csv
MAP_FILE = "keyword_map.csv"
with open(MAP_FILE, newline="", encoding="utf-8") as f:
rows = list(csv.DictReader(f))
by_url = {row["url"]: row for row in rows}
links = []
for row in rows:
if row["status"] != "existing":
continue
parent = by_url.get(row.get("parent_url", ""))
if parent is None or parent["status"] != "existing":
continue
# child to parent
links.append((row["url"], parent["url"], parent["primary_keyword"], "child to parent"))
# parent to child
links.append((parent["url"], row["url"], row["primary_keyword"], "parent to child"))
with open("link_plan.csv", "w", newline="", encoding="utf-8") as f:
writer = csv.writer(f)
writer.writerow(["source", "target", "anchor", "rule"])
writer.writerows(links)
print(f"wrote {len(links)} planned links")For this to run, keyword_map.csv must include a parent_url column. For example:
url,page_type,primary_keyword,supporting_keywords,intent,status,parent_url
/running-shoes/,category,running shoes,"best running shoes; buy running shoes",commercial,existing,
/running-shoes/trail/,category,trail running shoes,"trail shoes; off-road running shoes",commercial,existing,/running-shoes/The script only produces hierarchy links. Article-to-category and sibling links need judgment, so add them by hand or extend the script with a links_to column.
Check the plan against the map
A link plan can be wrong in ways that are easy to detect. Run these checks before you edit any page.
- Orphans. Find every existing URL that is never a target in the plan. A page with no incoming internal links is hard for crawlers to find and gets no support from the rest of the site.
- Over-linked targets. Count incoming links per target. If one page receives many times more than a page of equal importance, rebalance.
- Anchor repetition. For each target, count how often each anchor text appears. If one exact phrase makes up nearly all anchors, vary some of them.
- Cannibalization risk. Look for links whose anchor is the primary keyword of a different page than the target. These send mixed signals and often reveal a cannibalization problem the map missed.
- Dead targets. Confirm every target has status
existing, and that the live URL returns a normal page rather than a redirect or error.
import csv
from collections import Counter
with open("link_plan.csv", newline="", encoding="utf-8") as f:
plan = list(csv.DictReader(f))
with open("keyword_map.csv", newline="", encoding="utf-8") as f:
pages = [r for r in csv.DictReader(f) if r["status"] == "existing"]
incoming = Counter(link["target"] for link in plan)
orphans = [p["url"] for p in pages if incoming[p["url"]] == 0]
print("Orphans:", orphans or "none")
print("Incoming links per page:")
for url, count in incoming.most_common():
print(f" {count:3d} {url}")Edge cases
- Pagination and filters. Faceted or paginated URLs usually do not belong in the map as separate targets. Link to the canonical category page, not to filter variants.
- Navigation and footer links. Sitewide links appear on every page, so they inflate counts and dilute meaning. Treat them as a separate layer. Plan contextual links in body copy on their own.
- Pages with different intent on the same topic. A commercial page and an informational guide may share words. Link them in the direction that matches the reader's journey, from guide to category, and keep the anchors distinct so each page keeps its own topic.
- Merged or redirected pages. When you resolve cannibalization by merging two pages, update every internal link that pointed at the old URL. Do not rely on the redirect alone.
- Too many links. There is no fixed safe number, but a page where links crowd out the content serves nobody. Prefer a few relevant links to a long list.
Keep the link plan tied to the map
When a row in the map changes, the link plan changes too. A new primary keyword means anchor text must change. A merged page means links must be redirected at the source. A new page means the plan needs at least one incoming link on the day it goes live. Add "update the link plan" to your checklist for every change to the map. The final chapter covers this routine.
Exercise
Your map has an article at /blog/trail-shoe-fit/ (informational, existing) and a category at /running-shoes/trail/ (commercial, existing). Which direction should you link first, which anchor text should you use, and what check would tell you the category is not being supported?
Show answer
Link from the article to the category first, because the article reader is likely to want to buy next. Use the category's primary keyword or a supporting keyword from the map as anchor, such as "trail running shoes" or "off-road running shoes", and vary it across articles. To check support, count incoming internal links to /running-shoes/trail/ in the link plan. A count of zero means it is an orphan, and a count far below pages of similar importance means it needs more links.
Exercise
A link plan has 40 links to /running-shoes/, and 38 of them use the anchor "running shoes". Name one problem and one fix.
Show answer
The anchors are almost all the same exact phrase, which looks unnatural and gives little variety of context. Change some of them to supporting keywords from the map (such as "best running shoes") or to descriptive phrases that fit the sentence they sit in.