# Audit the internal link graph

- Check 12.17 · Internal linking · Important
- Source: https://checklist-seo-geo.com/en/internal-linking/audit-internal-link-graph
- Export every internal link, calculate an internal PageRank and the links between sections, visualize the graph and find where link equity gets lost.
- Updated on 2026-11-25
- Licence: CC BY 4.0. Credit “Checklist SEO & GEO” with a link to https://checklist-seo-geo.com/en/internal-linking/audit-internal-link-graph.
- Plugin checklist-seo-geo: 1.3.1 · https://github.com/maximegaul/checklist-seo-geo

## In short

The internal link graph is the set of the site's pages (the nodes) and the links connecting them (the edges). Auditing it means analyzing it as a whole rather than page by page: where links concentrate, which sections link to each other, which pages capture internal link equity without deserving it, which ones lack it. The task produces a table of pages with an estimated internal PageRank, a matrix of links between sections, a visualization and a list of actions. It brings together the other internal linking tasks, and should be repeated after every redesign and once or twice a year.

## Why it matters

Google states that the number of internal links pointing to a page and the number of links to follow to reach it help it estimate the page's relative importance. Both measures depend on the whole graph: a page gets more weight when it is linked from pages that are themselves well linked. This is the principle of PageRank, published by Google's founders; the actual algorithm used today is not public, but the model remains a good diagnostic tool.

Page-by-page audits miss some problems:

- **Link equity leaks**: tag pages, login pages or the legal notice are among the most linked pages on the site, because they appear in every template.
- **Closed silos**: the blog links heavily to the blog, almost never to the commercial pages.
- **Dead ends**: some pages receive links but send none, and the journey stops there.
- **Misalignment**: strategic pages sit in the middle of the internal link equity ranking, behind pages with nothing at stake.

For generative engines, a consistent graph, where each topic is connected to its reference page, helps bots that follow links find the right page. No practice guarantees a citation.

## What it improves

- **Internal linking priorities**: you know where to add and where to remove links, with figures to back it up.
- **Relative importance of strategic pages**, measured before and after the fixes. An indirect effect on rankings, not guaranteed.
- **Crawling**: fewer links to worthless pages, fewer dead ends.
- **Topical consistency**: sections connected to their pillar pages and to the commercial pages.
- **Monitoring**: a tracking indicator (the rank of strategic pages in the internal PageRank) to compare from one audit to the next.

## How to check

A first diagnosis in thirty minutes:

1. **Search Console**: [Links report](https://search.google.com/search-console/links), table of top internally linked pages. Are the top ten pages that matter?
2. **Screaming Frog** (free up to 500 URLs): crawl, then `Crawl Analysis > Start`, `Internal` tab, sort by `Link Score`, the tool's internal link equity indicator, on a scale of 0 to 100. Strategic pages should be near the top of the ranking.
3. **Semrush or Oncrawl**: their audits calculate an equivalent indicator (Internal LinkRank in Semrush, Inrank in Oncrawl).

Compliant result: strategic pages are in the top quarter of the internal link equity ranking, no page with nothing at stake (legal, tag, account) is in the top tenth apart from the home page, and each section sends links to its pillar page and to at least one commercial page.

## How to implement

### Step 1 — Export the edges

**With Screaming Frog**:

1. Crawl the site from the home page's canonical URL, with the smartphone user agent (`Configuration > User-Agent`).
2. Run `Crawl Analysis > Start`.
3. `Bulk Export > Links > All Inlinks`: each row is a link, with `Type`, `Source`, `Destination`, `Anchor`, `Status Code`, `Follow`, `Link Position`. Save the file as `liens.csv`.
4. Also export the `Internal` tab (URL, indexability, `Crawl Depth`, `Link Score`).

**With another crawler**: Sitebulb, Oncrawl, Botify, or the Semrush and Ahrefs audits also export the list of internal links; only the column names change.

Without a license beyond 500 URLs, crawl section by section, or use a command-line crawler that produces a “source, destination” list.

### Step 2 — Calculate the indicators

From `liens.csv`, this Python script calculates an internal PageRank, unique inbound and outbound links, and the matrix of links between sections. It requires the NetworkX library (`python3 -m pip install networkx`). Also create a `strategiques.txt` file with one strategic URL per line. Save the script as `graphe.py`:

```python
#!/usr/bin/env python3
"""Internal PageRank, degrees and matrix between sections, from an All Inlinks export."""
import csv
import urllib.parse
from collections import Counter

import networkx as nx


def section(url):
    path = urllib.parse.urlsplit(url).path.strip("/")
    return "/" + path.split("/")[0] + "/" if path else "/"


graph, content_graph = nx.DiGraph(), nx.DiGraph()

with open("liens.csv", encoding="utf-8-sig") as handle:
    for row in csv.DictReader(handle):
        if row.get("Type", "Hyperlink") != "Hyperlink":
            continue
        if str(row.get("Follow", "true")).lower() != "true":
            continue
        if row.get("Status Code", "200") != "200":
            continue
        source, target = row["Source"], row["Destination"]
        if source == target:
            continue
        graph.add_edge(source, target)
        if row.get("Link Position") == "Content":
            content_graph.add_edge(source, target)

with open("strategiques.txt", encoding="utf-8") as handle:
    strategic = {line.strip() for line in handle if line.strip()}

rank = nx.pagerank(graph, alpha=0.85)
ordered = sorted(rank, key=rank.get, reverse=True)
position = {url: index + 1 for index, url in enumerate(ordered)}

with open("pages-graphe.csv", "w", newline="", encoding="utf-8") as handle:
    writer = csv.writer(handle)
    writer.writerow(["url", "section", "rang", "pagerank_x1000", "liens_entrants", "dont_contenu", "liens_sortants", "strategique"])
    for url in ordered:
        writer.writerow([
            url,
            section(url),
            position[url],
            round(rank[url] * 1000, 3),
            graph.in_degree(url),
            content_graph.in_degree(url) if url in content_graph else 0,
            graph.out_degree(url),
            "yes" if url in strategic else "",
        ])

matrix = Counter((section(s), section(t)) for s, t in graph.edges())
sections = sorted({name for pair in matrix for name in pair})

with open("matrice-sections.csv", "w", newline="", encoding="utf-8") as handle:
    writer = csv.writer(handle)
    writer.writerow(["from \\ to"] + sections)
    for origin in sections:
        writer.writerow([origin] + [matrix[(origin, target)] for target in sections])

missing = strategic - set(rank)
print(f"{graph.number_of_nodes()} pages, {graph.number_of_edges()} unique links.")
print(f"Strategic pages missing from the graph: {len(missing)}")
for url in sorted(strategic & set(rank), key=position.get):
    print(f"  rank {position[url]:>6}  {url}")
```

```bash
python3 graphe.py
```

The script keeps only followed links to pages returning a 200, with no self-loops, and counts each source-destination pair only once. The resulting PageRank is a model: it does not reproduce Google's calculation, it serves to compare pages with each other and one audit with the next.

### Step 3 — Read the page table

Open `pages-graphe.csv` and run these checks:

| Check | Warning sign | Action |
|---|---|---|
| The top 20 pages by rank | Legal, tag, account, cart pages | [Remove unnecessary links](https://checklist-seo-geo.com/en/internal-linking/remove-unnecessary-links) from templates |
| Rank of strategic pages | A strategic page outside the top quarter | [Pass link equity to strategic pages](https://checklist-seo-geo.com/en/internal-linking/pass-link-equity-strategic-pages) |
| `dont_contenu` column | Strategic pages at 0 | [Add contextual links](https://checklist-seo-geo.com/en/internal-linking/add-contextual-links) |
| `liens_sortants` column | Content pages at 0 or 1 (dead ends) | Links to the pillar page and related content |
| Strategic pages missing from the graph | No followed link to them | [Detect orphan pages](https://checklist-seo-geo.com/en/architecture-navigation/detect-orphan-pages) |
| Poorly linked but visible pages | Low rank, high impressions | [Identify under-linked pages](https://checklist-seo-geo.com/en/internal-linking/identify-under-linked-pages) |

### Step 4 — Read the matrix between sections

`matrice-sections.csv` counts the unique links from one section to another. A fictional example for Plomberie Garnier:

| From \ to | `/` | `/blog/` | `/depannage/` | `/entretien/` | `/mentions-legales/` |
|---|---|---|---|---|---|
| `/` | 0 | 12 | 6 | 4 | 1 |
| `/blog/` | 180 | 1,450 | 9 | 3 | 180 |
| `/depannage/` | 14 | 2 | 40 | 6 | 14 |
| `/entretien/` | 8 | 0 | 5 | 22 | 8 |

Reading: the blog (180 posts) mostly links to the blog and sends barely 12 links to the service pages, and links to the legal notice as often as to the home page. The maintenance pages never link back to the guides. Actions: contextual links from posts to services, a guides block on the service pages. See [link guides and commercial pages](https://checklist-seo-geo.com/en/internal-linking/link-guides-commercial-pages) and [link articles and pillar pages in both directions](https://checklist-seo-geo.com/en/internal-linking/link-articles-pillar-pages-both-directions).

On a site organized in clusters, replace the `section()` function with a lookup in the [keyword-to-page map](https://checklist-seo-geo.com/en/strategy-keyword-research/build-keyword-page-map) (URL and cluster): the matrix then shows isolated clusters directly.

### Step 5 — Visualize

**With Screaming Frog**: the `Visualisations` menu offers crawl diagrams (tree graph and force-directed crawl diagram). They show depth and clusters of pages, and remain readable up to a few thousand URLs.

**With Gephi** (free, open source): prepare an edge file with two columns, `Source` and `Target`, import it as a spreadsheet in the Data Laboratory, then:

1. Apply the ForceAtlas 2 layout: well-connected sections cluster together, isolated sections drift apart.
2. Run the modularity calculation (Statistics) and color the nodes by community: you see the groups of pages that link to one another.
3. Size the nodes by PageRank (a statistic calculated by Gephi, or a column imported from `pages-graphe.csv`).

A visualization helps convince people and spot an anomaly; decisions are made from the tables.

### Step 6 — Write up the actions and track them

Deliverable: a prioritized action table, then tracking from one audit to the next.

| Problem | Pages affected | Action | Owner | Deadline |
|---|---|---|---|---|
| Legal notice ranked 3rd | Footer template | Group the legal links, remove duplicates | Developer | 2026-12-05 |
| Services barely linked from the blog | 180 posts | 1 contextual link per post to the service for its topic | Editorial team | 2026-12-31 |
| 9 guides with no outbound links | List in appendix | Links to the pillar page and 2 related pieces of content | Editorial team | 2026-12-15 |

| Audit | Pages | Unique links | Median rank of strategic pages | Strategic pages outside the top quarter | Dead ends |
|---|---|---|---|---|---|
| 2026-06 | 1,210 | 38,400 | 142 | 11 | 37 |
| 2026-11 | 1,260 | 31,900 | 58 | 3 | 9 |

Made-up figures. Repeat the audit after every template redesign and once or twice a year; between two audits, the [click depth check](https://checklist-seo-geo.com/en/internal-linking/check-click-depth) and a [scheduled crawl](https://checklist-seo-geo.com/en/automation-quality-control/schedule-automated-crawls) are enough.

> **Good to know:** template links (menu, footer) weigh heavily in an internal PageRank, because they are present on every page. Also calculate the graph using only links in the “Content” position: that is the one that shows the quality of your editorial internal linking.

## Common mistakes

- **Taking the calculated PageRank for Google's**: it is a diagnostic model, not a measure of what the search engine does.
- **Mixing `nofollow` links, redirects and errors** into the graph: the results are skewed. Filter them out and deal with them separately.
- **Crawling with facet parameters**: thousands of filter URLs swamp the graph. Exclude them from the crawl.
- **Comparing two audits run with different tools or settings**: keep the same protocol.
- **Trying to “sculpt” PageRank with internal `nofollow` links**: Google does not recommend it; remove unnecessary links instead.
- **Stopping at the visualization**: a nice picture without an action table changes nothing on the site.

## Frequently asked questions

### What is a page's internal PageRank?

Internal PageRank is an estimate of a page's importance calculated from your site's links alone: a page gets more weight if it is linked from pages that are themselves well linked. Crawlers approximate it under various names, such as Link Score, Internal LinkRank or Inrank. It is not the value Google uses, but it is a good tool for comparing your pages with one another.

### Do you need a paid tool to audit internal linking?

No, an internal linking audit can be done for free. The free version of Screaming Frog exports all the internal links of a site of up to 500 URLs, Search Console shows the most linked pages based on a sample, and a Python script with NetworkX calculates the internal PageRank and the links between sections. Gephi, which is free, is used to visualize the graph. Paid tools mainly add history and scale.

### What if the legal notice is among the most linked pages?

If the legal notice is among the most linked pages, that is normal for a footer link present across the whole site, and you should keep it. Just check that it is not repeated several times per page and that the legal pages are not split into five separate links. The real goal is to lift your strategic pages, with links from the menu, section pages and content.

### How often should the internal link graph be audited?

Audit the internal link graph after every redesign, theme change or menu reorganization, and once or twice a year on a stable site. Between two full audits, a scheduled crawl and a monthly check of click depth and broken links are enough to spot drift. Keep the same tool and the same settings so you can compare results over time.

## Resources

- [Google Search Central: Ecommerce site structure](https://developers.google.com/search/docs/specialty/ecommerce/help-google-understand-your-ecommerce-site-structure?hl=en)
- [Google Search Central: Link best practices](https://developers.google.com/search/docs/crawling-indexing/links-crawlable?hl=en)
- [Search Console Help: Links report](https://support.google.com/webmasters/answer/9049606?hl=en)
- [NetworkX: pagerank function](https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.link_analysis.pagerank_alg.pagerank.html)
- [Gephi: documentation](https://docs.gephi.org/)
- [Screaming Frog SEO Spider: user guide](https://www.screamingfrog.co.uk/seo-spider/user-guide/)

Next steps: [pass link equity to strategic pages](https://checklist-seo-geo.com/en/internal-linking/pass-link-equity-strategic-pages) and [schedule automated crawls](https://checklist-seo-geo.com/en/automation-quality-control/schedule-automated-crawls).
