Crawl & Logs Field Note Updated 2026-11-16 3 min read Python · NetworkX · Internal Equity

Modeling Internal PageRank with Python & NetworkX: Fixing Equity Leaks at Scale

Header mega-menus and unpruned tag archives silently funnel 70% of internal link equity away from revenue pages. Calculating internal PageRank exposes the exact structural bottlenecks.

Dmitry K., Technical SEO Lead · SEO Space

Indexation benchmark targets

Graph library
NetworkX directed link graph
Target depth
<= 3 clicks for core revenue URLs
Damping factor
0.85 standard link weight model

Turning Raw Crawl Exports Into an Equity Model

Looking solely at inlink counts misleads SEO teams because ten links from deep low-authority tag pages pass a fraction of the weight carried by two contextual links inside flagship guides. Modeling the directed hyperlink graph captures recursive authority propagation across your entire domain.

Filtering out noindex pages, redirect targets, and boilerplate utility links first reveals where genuine editorial PageRank concentrates.

  • Export all indexable 200-OK HTML URLs along with source, destination, anchor text, and placement zone (nav, body, footer).
  • Assign higher edge weights to body editorial links compared to sitewide footer boilerplate links.
  • Sort commercial solution pages and product categories by computed internal PageRank vs. trailing 90-day Search Console impressions.

Computing Weighted Directed PageRank in Python

Build a directed graph from crawl CSV exports and inspect lowest-scoring revenue pages.

Reallocate equity systematically rather than sprinkling random sidebar widgets.

Graph Bottleneck Diagnostic Symptom Architectural Remediation
Footer link bloat Legal/login pages top 10 by PR Move non-SEO utility links out of sitewide SSR nav
High-depth money pages Click depth >= 4, low impressions Add contextual hub cards from /blog/ and pillar pages
One-way hub links Articles never link back to commercial hubs Add contextual Next Step / Solution links inside top 20% posts
import pandas as pd
import networkx as nx

df = pd.read_csv("internal_links.csv")
G = nx.DiGraph()
for row in df.itertuples():
    weight = 2.0 if row.zone == "body" else 0.5
    G.add_edge(row.source_url, row.target_url, weight=weight)

pr = nx.pagerank(G, alpha=0.85, weight="weight")
ranked = sorted(pr.items(), key=lambda x: x[1], reverse=True)
print("Bottom 20 money pages:", [u for u in ranked if "/solutions/" in u[0]][-20:])

Need this indexation setup audited on your domain?

Send your website URL. We check raw HTML parity, log crawl hits, canonical discipline, and sitemap architecture manually within 24 hours.