Sub topic 5
Inventory the pages you already have
This chapter assumes you know how search engines rank pages, how URLs, categories and internal links fit together, and how to work in a spreadsheet or CSV file. By the end, you will have a clean list of every indexable page on your site, with its current target keyword, so the later mapping step starts from facts instead of memory.
Why the inventory comes first
A keyword map assigns clusters of keywords to pages. You cannot assign a cluster to a page you have not listed. You also cannot tell whether a keyword is new or already covered. Skipping the inventory leads to two common errors:
- You plan a new page for a topic that an old page already covers, which creates cannibalization later.
- You forget that a page exists, so it never receives a target, links or updates.
The inventory answers three questions for each page. What is it? What does it currently aim at? Is it worth keeping as a target?
Decide which pages count
Not every URL belongs in the map. Include a URL only if a searcher could reasonably land on it from search results. Everything else is noise.
| URL type | Include in the map? | Reason |
|---|---|---|
| Category and product listing pages | Yes | They usually target commercial keywords. |
| Product, service and landing pages | Yes | They target specific commercial or transactional terms. |
| Blog posts, guides, FAQs | Yes | They target informational keywords. |
| Home page | Yes | It targets the brand and the main topic. |
| Filtered or sorted URLs (`?sort=price`) | No, record the canonical page instead | They duplicate the parent page. |
| Pagination (`/page/2/`) | No | The first page carries the target. |
| Cart, login, account, thank-you pages | No | They have no search value. |
| Redirected URLs (3xx) | No, but note the destination | The destination is the real page. |
| Pages with `noindex` | No, but flag them | Search engines are told not to list them. |
| Error pages (4xx, 5xx) | No, but fix or remove | They cannot rank. |
Keep the excluded URLs in a separate tab. You will need them when you check for broken links and redirects, but they should not appear in the map itself.
Collect the URLs
No single source is complete, so combine at least two.
- A crawl. Run a crawler such as Screaming Frog or Sitebulb from the home page. It finds pages reachable through internal links. It misses orphan pages, which are pages with no internal links pointing to them.
- The XML sitemap. This lists the pages the site owner wants indexed. It can include stale URLs, and it can omit pages by mistake.
- Search Console. The Pages report and the Performance report show which URLs Google has indexed and which receive impressions. This is the best source for orphan pages that still get traffic.
- The CMS. A content management system export lists every published page, including ones nobody links to.
Merge the lists and remove duplicates. A URL that appears in the sitemap and in Search Console but not in the crawl is an orphan. Mark it, because it matters for internal linking later in the tutorial.
Normalize before you merge
Duplicates hide behind small differences. Before comparing lists, make URLs consistent:
- Use one protocol and one host (
https://www.example.com). - Lowercase the path where the server treats paths as case-insensitive.
- Decide on a trailing slash and apply it everywhere.
- Strip tracking parameters such as
utm_source.
If you skip this step, /running-shoes and /running-shoes/ look like two pages and your counts will be wrong.
from urllib.parse import urlsplit, urlunsplit, parse_qsl, urlencode
TRACKING = {"utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content", "gclid", "fbclid"}
def normalize(url):
parts = urlsplit(url.strip())
host = parts.netloc.lower()
path = parts.path or "/"
if not path.endswith("/") and "." not in path.rsplit("/", 1)[-1]:
path += "/"
query = [(k, v) for k, v in parse_qsl(parts.query) if k not in TRACKING]
return urlunsplit(("https", host, path, urlencode(query), ""))
urls = [
"http://www.example.com/running-shoes",
"https://www.example.com/running-shoes/?utm_source=news",
"https://www.example.com/Blog/Guide.html",
]
print(sorted({normalize(u) for u in urls}))The first two inputs collapse into one URL, so the set holds two entries. The script does not lowercase paths, because many servers treat /Blog/ and /blog/ as different pages. Decide that per site.
Record the current target of each page
For each included URL, record what the page is trying to rank for today. Take it from evidence, in this order:
- The title tag and the H1. These show the intended topic.
- The queries in Search Console that bring the page the most impressions.
- The main topic of the body copy.
Write the current target as a candidate, not as a final decision. Later chapters decide whether it stays. Capture these fields:
| Field | Source | Why you need it |
|---|---|---|
| `url` | Normalized crawl, sitemap and Search Console merge | Identifies the page. |
| `page_type` | Your judgment, helped by URL patterns | Category, product, article and so on. |
| `title` and `h1` | Crawler | Shows the intended topic. |
| `indexable` | Crawler (status code, `noindex`, canonical) | Separates pages that can rank from those that cannot. |
| `top_query` | Search Console | Shows what the page actually ranks for. |
| `impressions` and `clicks` | Search Console, one fixed date range | Shows whether the page matters. |
| `inbound_links` | Crawler | Counts internal links to the page. |
| `current_target` | Derived from title, H1 and top query | Your starting point for the map. |
Use one fixed date range for all metrics, for example the last 90 days. Mixed ranges make pages impossible to compare.
When the title and the top query disagree
This is the most useful signal in the inventory. Suppose the title says "Trail Running Shoes for Men" but the page's top query is "best running shoes". Two explanations are possible: the page matches a broader intent than its author planned, or the title is misleading. Do not resolve it now. Put both values in the notes column and let the mapping chapter decide.
Judge which pages to keep as targets
Every indexable page falls into one of four groups. This triage tells you what to do with it when you assign clusters.
| Group | Signs | Usual action |
|---|---|---|
| Performing | Clear target, steady impressions and clicks | Keep the target, protect the page. |
| Underperforming | Clear target, impressions but low position | Keep the target, improve the page. |
| Unfocused | Several topics, no clear target | Pick one target or split the page. |
| Dead weight | No impressions, thin content, no links | Merge, redirect or remove. |
New pages are the exception. A page published last week has no data, so do not label it dead weight. Give recent pages a grace period, such as 90 days, before you judge them.
Build the inventory as a keyword map starting point
The inventory feeds directly into the keyword map layout shown in the next chapter. Start with the same columns so you do not rebuild the sheet. The status column separates existing pages from planned ones, and at this stage every row is existing.
url,page_type,primary_keyword,supporting_keywords,intent,status,notes
/running-shoes/,category,running shoes,"best running shoes; buy running shoes",commercial,existing,needs new intro copy
/blog/how-to-choose-running-shoes/,article,how to choose running shoes,"running shoe fit; running shoe size guide",informational,existing,link to categoryLeave primary_keyword as your best current-target guess for now. Add the extra inventory fields (impressions, inbound_links, indexable) in columns to the right, so you can sort and filter on them without disturbing the map's core columns.
A quick check for inventory problems
Before moving on, scan the data for these patterns:
- Duplicate current targets. Two indexable pages with the same
current_targetare early cannibalization suspects. - Indexable pages with no impressions. They may be new, blocked, or ignored by search engines.
- Pages with impressions but no inbound links. These are orphans that deserve links.
- Non-indexable pages with strong traffic history. A
noindextag or a bad canonical may have been added by mistake.
import csv
from collections import defaultdict
by_target = defaultdict(list)
with open("inventory.csv", newline="", encoding="utf-8") as f:
for row in csv.DictReader(f):
if row["indexable"].strip().lower() == "yes":
by_target[row["current_target"].strip().lower()].append(row["url"])
for target, urls in by_target.items():
if len(urls) > 1:
print(f"{target!r} is the current target of {len(urls)} pages: {urls}")The script expects inventory.csv with url, indexable and current_target columns. Treat each hit as a question to investigate, not a verdict. Two pages can share a topic and still serve different intents.
Edge cases
- Large sites. For tens of thousands of URLs, inventory by template first. Sample a few pages per template, then apply the pattern, and review outliers by hand.
- Multilingual sites. Give each language version its own row and record its
hreflangpartner. Do not treat translations as duplicates. - Canonicalized pages. If page A canonicalizes to page B, only B belongs in the map. Record A in the excluded tab with B as its destination.
- Parameter-driven faceted navigation. Some filtered pages deserve a target, such as "red running shoes". Include those only when you have decided to make them real, indexable landing pages.
- JavaScript-rendered content. A crawler that does not render JavaScript may miss the title or the links. Check one page with rendering turned on.
Summary of the working steps
- Decide which URL types count as mappable pages.
- Collect URLs from a crawl, the sitemap, Search Console and the CMS.
- Normalize and merge them, then split off excluded URLs.
- Record page type, indexability, metrics and a candidate current target for each page.
- Triage the pages and scan for duplicate targets and orphans.
Exercise
Your merged list contains /shoes/trail/, /shoes/trail/?sort=price, /shoes/trail/page/2/ and /shoes/trail-old/, which returns a 301 redirect to /shoes/trail/. Which of these belong in the inventory as mappable pages, and where do the others go?
Show answer
Only /shoes/trail/ is a mappable page. The sorted URL duplicates it, and the paginated URL is covered by the first page, so both go in the excluded tab with /shoes/trail/ as the canonical page. The redirecting URL goes in the excluded tab with its destination noted, because the destination is the real page.
Exercise
A page's title is "Beginner Guide to Kayaks", but Search Console shows its top query is "inflatable kayak reviews" with 4,000 impressions. How should you record this in the inventory, and why not decide immediately which one is the target?
Show answer
Record the title-based topic and the top query as two values, and put the mismatch in the notes column. The target is decided during page mapping, after keywords are clustered and intents are compared. The mismatch may mean the page serves a broader or different intent than planned, and another page may already target the same query.
Exercise
Your duplicate-target scan shows that two indexable pages both have the current target "running shoes". Is this proof of cannibalization? What would you check next?
Show answer
No, it is only a suspect. Check whether the two pages serve the same intent, for example a category page for buying and a guide for learning. Compare the queries each page ranks for in Search Console and see whether they swap positions for the same query. If they compete for the same query with the same intent, treat it as cannibalization in the later step.