Technical SEO
Internal linking analysis
The internal linking skill analyzes your site's link architecture to improve authority flow and crawlability. It detects orphan pages with no internal links, evaluates link distribution between pillar and support pages, analyzes anchor text quality, and finds contextual linking opportunities. Each recommendation includes the source page, the target page and the suggested anchor text. It does not modify the site unless you ask it to.
--- name: internal-linking description: > Analyzes and optimizes internal linking: orphan pages, click depth, link distribution, topic clusters, and anchors. Use it when the user mentions internal linking, internal links, orphan pages, architecture, topic clusters, anchor text, or asks "which pages need more links?". Diagnoses and recommends specific links; it does not modify the site unless asked. --- # Internal linking Internal links are one of the few ranking levers the site owner fully controls: they signal which pages matter, how topics relate to each other, and where authority flows. ## When to use - Full internal linking audit of a site. - Optimizing a specific page (which links to add from and to it). - Planning links for new content. ## Inputs Domain or URLs. Useful: sitemap (to detect orphans the crawl doesn't find), priority business pages and, if available, traffic data (GSC/GA4) for prioritization. ## Workflow ### 1. Data Reuse `crawler/output//_pages.json` if it exists. Otherwise: ```bash python3 shared/seo_extract.py --sitemap https://example.com/sitemap.xml --limit 100 -o crawler/output/ /_pages.json ``` The more pages, the more reliable the graph: with <20 pages, orphans are only indicative. ### 2. Script → report ```bash python3 internal-linking/scripts/link_graph.py crawler/output/ /_pages.json --sitemap https://example.com/sitemap.xml ``` Writes `report/data/ /internal-linking.json` with: inbound links per page (unique sources), click depth from the home page, orphans, pages linked only from nav/footer, link zones, generic anchors, and destinations outside the crawl. ### 3. Analysis (Claude) Complete `score`, `summary`, `findings`, `actions`. The script provides the graph; you provide the judgment: 1. **Orphans** — the highest-priority fix. For each one: link to it (if relevant), redirect, or delete (obsolete/weak)? Indicate which pages to link from. 2. **Under-linked business pages** — compare the pages receiving the most links with the ones that should be receiving them. 3. **No contextual links** — links only from menu/footer convey little context. Read the text of related pages and propose where to insert links. 4. **Clusters** — pillar ↔ cluster articles, in both directions, and sibling articles linking to each other. 5. **Anchors** — generic ("read more", "here"), over-optimized (always the same exact match) or not describing the destination. Indicative ratio: exact 10–20 %, partial 30–40 %, brand/natural 20–30 %, generic 10–20 %. 6. **Depth** — important pages more than 3 clicks away. Each link recommendation includes **source, destination, suggested anchor, and location** (section or paragraph). Put them in `tables`: ```json {"title": "Links to add", "columns": ["Source", "Destination", "Suggested anchor", "Where", "Reason"], "rows": [...]} ``` ### 4. Report `python3 report/build_report.py --open` ## Prioritization 1. Orphans with traffic or rankings → immediate ROI. 2. Under-linked business pages, from pages with authority. 3. Close clusters. 4. Replace generic anchors on important links. 5. Contextual links in content with traffic. 6. Navigation/footer tweaks (global reach, little value per link). ## Scoring 100 − 5 for each 5 % of orphan pages · −10 if >10 % of pages are more than 3 clicks away · −10 if business pages have no contextual links · −5 if >10 % of anchors are generic · −10 if there are nofollow internal links · −5 for broken internal destinations. Minimum 0. ## Rules - Never "add more internal links" in the abstract: always source → destination → anchor. - State the data source (crawl, sitemap, analytics, or inference). - Don't recommend linking to pages with noindex or a canonical pointing to another URL. - Don't use WebFetch for canonical/robots: it's in `_pages.json`.