Skip to content
← ALL WRITING

2026-04-23 / 7 MIN READ

Internal linking automation that does not create link farms

A pattern library for automated internal linking on programmatic sites, covering semantic neighbors, anchor variation, and how to avoid the link-farm trap.

Internal linking on a programmatic content site lives in a narrow window. Link too little and each new page is an island, crawled rarely, ranked slowly. Link too much, especially with the same anchor text to the same target, and the pattern looks like a link farm to Google's algorithms, which is a category that has been algorithmically penalized since the late 2000s.

Automation is necessary because writing internal links by hand across 500 pages does not scale. The trick is automating it in a way that produces a graph that looks editorial, not mechanical. This is the pattern library I use, five patterns that together cover the common cases without tripping the link-farm heuristic.

10 edges
Each page links to two semantic neighbors plus the hub. Flow signal clean. Auto-toggles every 3.4s.

A link farm is a network of pages where every page links to every other page, often with the same anchor text, usually without regard for the topical relationship between the pages. The pattern exists to game link graph signals, and search engines identify and discount it.

Naive programmatic linking (template says "add 5 internal links to related pages from the same category") produces something that looks close enough to a link farm that algorithmic signals treat it similarly. The signal Google looks for is not "how many internal links does this site have." It is "does the link graph look like a human built it for humans, or like a script built it for crawlers."

The patterns below are about producing a link graph in the first category.

Pattern 1: semantic neighbor selection

Instead of linking to pages in the same category, link to pages that are semantically similar. Semantic similarity can be computed with embeddings (Claude, OpenAI, or local models), and the graph produced is measurably different from a category-based graph.

The implementation I use is straightforward: embed every page title and first paragraph into a vector, compute cosine similarity at build time, and for each page, select the 3-5 most similar pages as link candidates. Exclude the most similar one if it is too similar (that often indicates a near-duplicate or a thin content variant).

The result is a graph where every page links to pages that a human reader would find genuinely relevant. That is the shape search engines reward.

Pattern 2: anchor text variation

A page that gets linked from 50 other pages with the same anchor text looks automated. The fix is to vary the anchor text across the linking pages. Three or four different anchor phrases per target page, rotated based on context.

The rotation can be handled by the linking template. For a target page titled "Schema markup for DTC product pages," valid anchors might include:

  • schema markup for DTC product pages (exact match)
  • Product schema walkthrough (descriptive)
  • how I set up Product schema (first-person)
  • what earns rich results (benefit-framed)

The template picks one anchor per context, cycling through the list. The result is a target page that earns inbound links with a natural distribution of anchor text.

In a properly-designed article registry, anchors are claimed per-target so no two articles use the same anchor for the same target. That mechanism prevents the "every page uses the same phrase" trap.

Pattern 3: hub-and-spoke with topical siblings

Every content page has two types of internal links: links up to the hub for its topic cluster, and links across to topical siblings in the same cluster. The hub link uses a consistent anchor pattern. The sibling links use varied anchors.

This produces a graph with clear hierarchical structure. The hub is the authority node for its topic. The siblings reinforce each other without over-linking. A typical implementation would give each page 1 hub link and 2-3 sibling links, plus 1-2 contextual links to adjacent clusters where the topics touch.

I cover the cluster architecture in topical cluster architecture for DTC. The linking pattern is the edge layer that sits on top of the cluster topology.

Internal links that live in the body of the article, inside sentences that would make sense even if the link were removed, carry more weight than links in a "related articles" footer. The same URL can appear in both places, but the body link is what signals editorial judgment.

The automated version of this is harder. Generating contextual body links requires the template (or the writer agent) to find a place in the prose where the link makes sense and insert the anchor there, not in a generic related-reading block at the end.

The pattern that works is to give the drafter (human or assisted) a list of 5-10 candidate target pages with 1-sentence descriptions, and ask them to work the most relevant 2-3 into the body naturally. The drafter decides where. The remaining 2-3 go in a related-reading block at the end as a supplement, not a primary signal.

Some links on a programmatic page are decorative: footer navigation, site-wide breadcrumbs that are already implied by the URL structure, "see all products" buttons. Marking these as rel="nofollow" (or omitting them from the link graph entirely) prevents the authority of the page from being diluted across links that do not carry topical weight.

The test is: would a human reader click this link to learn something related to the current page? If yes, it is a real internal link. If no, it is decorative, and the page crawl budget is better spent elsewhere.

What breaks when you automate this poorly

Three failure modes I have seen in client audits.

Same anchor, many targets. A template that uses the same phrase ("learn more") for every automated link creates a pattern where the anchor text carries no semantic signal. This is less actively penalized than the link-farm pattern, but it wastes the anchor-text signal entirely.

Same target, many pages. A single "sign up for our newsletter" link appearing on 500 pages creates outsized authority flow into a destination that does not need it. If the destination is already the homepage or a conversion page, this is neutral. If it is an arbitrary landing page, the disproportionate authority looks algorithmic.

Cross-cluster link flooding. A programmatic SEO site covering multiple topics sometimes links across all clusters from every page, diluting topical focus. The fix is to link primarily within-cluster, with a smaller number of cross-cluster links to genuine semantic neighbors.

The audit I run on client engagements has four steps.

  1. Crawl the site with a tool that maps internal link graph (Screaming Frog, Sitebulb, or a custom crawl). Extract source, target, anchor text, and context (body vs. nav vs. footer) for every edge.
  2. Plot the graph. Look for nodes with unusually high in-degree (hub concentration is fine; random concentration is a flag). Look for dense sub-clusters where every node links to every other node.
  3. Group edges by anchor text. Flag any anchor text used more than 3-5 times for the same target. These are candidates for anchor rotation.
  4. Review any edge that is not in body content. Many of these should be nofollowed or removed.

The output is a short list of template changes that produce measurable ranking improvements, usually within 60-90 days once Google recrawls.

The signal Google looks for is not how many internal links you have. It is whether the graph looks like a human built it for humans.

Where this fits

Internal linking is one of the highest-leverage technical SEO disciplines for programmatic content. The cluster hub frames the broader program. Topical cluster architecture for DTC covers the topology that the linking pattern sits on top of. Entity SEO for ecommerce covers how the link graph contributes to entity recognition.

If you want the link-graph audit run on your own site as part of a broader technical SEO review, the DTC stack audit includes it. Full product ladder is at /products.

For the Shopify side of linking (collection hierarchies, tag pages, variant canonicals), shopify hub architecture for 2m brands is the companion piece.

Sources and further reading

  • Google Search Central: Link spam guidelines, 2023-2025 updates
  • Screaming Frog documentation on internal link analysis
  • web.dev: Internal linking and crawl budget guidance

// related

Let us talk

If something in here connected, feel free to reach out. No pitch deck, no intake form. Just a direct conversation.

>Get in touch