Skip to content

Automatic Internal Linking: Three Ways to Add Links at Scale

By Lazarina Stoy · 13 min read
Automatic Internal Linking: Three Ways to Add Links at Scale: illustration of pages connected by internal links. An MLforSEO guide by Lazarina Stoy.

Most internal linking projects I’ve seen stall in the same place. The audit is done, the link plan is approved, everyone agrees it’s a good plan. Three months later, half of the links are still waiting for someone to open the editor.

The finding part of internal linking has become easy to automate. I’ve written up ten ways to automate internal linking with AI, from orphan detection to embeddings and LLM anchor text. This guide is about the step after that: getting approved links onto hundreds of pages, and being able to take them off again. Everything you’ve planned does nothing for the site until a crawler sees the link in the HTML.

There are three ways to add internal links at scale, and every automatic internal linking tool you’ll come across does one of them. I run all three across my own sites, so the examples below are real, with real numbers. Once you know which way a tool works, you know what it’s good at, what can go wrong, how to undo it, and how to check it with a crawl.

Free template

Internal linking measurement template: a Google Sheets and Excel workbook that checks your links shipped and compares clicks and impressions for test and control pages, before and after the change.

On this page
  1. The question that decides everything: where does the link live?
  2. Way 1: rules applied when the page loads
  3. Way 2: links saved into the content
  4. Way 3: template blocks
  5. The three ways side by side
  6. Which way fits your site, team and CMS
  7. How to check each way with a crawl
  8. Did it work? Measure against a control group
  9. Where the course takes this further
  10. Frequently asked questions
Three ways to add internal links at scale: rules applied when the page loads, links saved into the content, and template blocks, each with a real example
Every automatic internal linking set-up does one of three things. Where the link lives decides how precise it is, how much it covers, how you undo it and what a crawl sees.

When I look at any linking set-up, I ask one question first: where does this link live? There are three answers.

  1. A rule applied when the page loads. The stored post never changes. A plugin, a build step or a script adds the link on the way out, wherever a phrase appears.
  2. A link saved into the content. The link sits in the post body, exactly as if an editor had typed it, in one specific sentence.
  3. A template block. Related posts, a glossary box, a product or course card. The template draws the links from a rule, and nobody picks them one by one.

I’m only talking about links in and around the body content here. Menus, footers and breadcrumbs are their own topic.

The answer decides the things you care about once links go live at scale: how precise each link is, how many pages get covered, whether you can switch it off, and what access you need to build it.

Way 1: rules applied when the page loads

You keep a table that says “this phrase links to that page”. When a page is produced, the linker finds the phrase in the body text and wraps it in a link. Change one rule and every page changes with it.

A real example: one engine, two very different jobs

On datastudioformarketers.com I run a small plugin I built with Claude Code, called Auto Links. It has 59 rules, and they add 1,675 links across the blog posts when the pages load. Only 32 of those are internal. The rest point to brands and affiliate partners, which is the job that site’s plugin was built for.

On my personal site, lazarinastoy.com, the same engine runs 21 rules. All of them are internal, and each one is capped at one link per post, pointing a topic at its cornerstone post. Same code, completely different job.

Where it happens matters

Three lanes showing where a render-time link is added: on the server, at the edge and in the browser, with which ones appear in the raw HTML and which only after rendering
Server and edge rules put the link in the HTML every crawler downloads. A JavaScript snippet adds it in the browser, so it only shows up for crawlers that render.

“When the page loads” can mean three different moments, and they aren’t equal for crawlers:

  • On the server: a WordPress plugin filtering the content, or a build step on a static site. The link is in the HTML every crawler downloads.
  • At the edge: a worker in front of your site, such as a Cloudflare Worker using HTMLRewriter, rewrites the HTML on its way to the visitor. Still in the HTML crawlers fetch.
  • In the browser: a JavaScript snippet adds the link after the page arrives. Google says it parses the rendered HTML for links after rendering, which can take longer than the first crawl, and that server-side rendering is still a great idea. Crawlers that don’t run JavaScript won’t see these links at all.

What to watch for

  • The links aren’t stored in your content, so a tool that reads your database won’t see them. A crawl will.
  • Page caches keep the old links until you purge them.
  • A rule is sitewide. It fires on every page that mentions the phrase, including pages you didn’t have in mind. Cap it at one link per page and exclude the page types where it shouldn’t run (product pages, the home page, legal pages).
  • Rules suit names and terms that should always point to one page. A link between two blog posts usually deserves its own sentence, with varied anchors.

Tools that work this way: auto-linking plugins on WordPress that filter content as it’s served, build-time scripts on static and headless sites, edge workers, and the JavaScript-snippet tools I compare in internal linking tools compared by where the link lives.

How to undo it: switch the rule off (the rule, not the whole plugin) and purge the cache. That takes a minute, which makes rules the safest way to run a test.

Here, an approved row from your link plan becomes a permanent edit: an API call, a CLI command or a person puts the link into one sentence. This is the most precise way. One source, one target, one sentence, which is exactly the shape of a row in a link menu.

A real example: Link Whisper on my personal site

I used Link Whisper on lazarinastoy.com, and it did a good job. Through suggestions I accepted, it inserted 48 links straight into my posts, and one keyword rule (“machine learning” to my beginner’s guide) placed nine more. In total it tracked 1,284 links in 73 posts, 463 of them internal, pointing at 143 pages.

Those links carry the most meaning of any link on a page: the anchor, the target’s topic and the sentence around it all tell search engines and AI systems what the target is about. And they live in the post itself. Link Whisper’s own FAQ says it plainly: removing the plugin does not remove any links. That’s a strength (links survive a CMS move, a theme change, anything) and a responsibility, because they also survive you changing your mind.

I moved off it in October 2026 for two reasons that had nothing to do with quality: what I paid compared with the two features I used, and wanting more control. I tell that story, with the numbers, in the tools comparison.

What to watch for

  • There’s no off switch. Before you write anything, run a dry run that shows every change, and keep a record of what you changed so you can roll it back.
  • Editors can overwrite a link without knowing why it’s there.
  • You need write access: a plugin on WordPress, the Admin API on Shopify, the Data API on Webflow, the management API on a headless CMS.

Tools that work this way: Link Whisper and AIOSEO’s Link Assistant on WordPress, LinkerFlow on Webflow, LinkBoss on WordPress and Shopify, and your own scripts against the platform’s API.

How to undo it: you need a log of every change: the page, the sentence and the link. WordPress revisions help, but a log is better, because it lets you reverse one batch without touching anything an editor changed since.

Way 3: template blocks

This is my favourite. Nobody picks these links one by one. A rule in the template decides them: three posts from the same category, the course that matches the topic, every place a glossary term appears. Every page gets linked on the day it’s published, including the ones nobody remembers to link to. This is how you stop orphan pages from being created in the first place.

A real example: the link blocks on mlforseo.com

Bar showing 14,375 links on mlforseo.com outside the menu and footer: 7,546 from template blocks, 5,919 in sentences and 910 in a sidebar, plus before and after figures for block links and pages with no links
One crawl of the 533 URLs in mlforseo.com's sitemaps: more than half of the links outside navigation come from template blocks. Block links went from 926 to 7,483, and pages with no links from 19 to zero.

When I crawled every URL in mlforseo.com’s sitemaps (533 pages) and labelled every link by where it sits, 7,546 of the 14,375 links outside the menu and footer came from template blocks. That’s more than half. 5,919 sat inside sentences and 910 in a sidebar.

Two blocks on the glossary do most of the work. “Other terms in the same category” produces 3,722 links, and “where this term shows up on MLforSEO” produces 2,622. The second one doesn’t search the site when a page loads. A script reads every post, resource and lesson offline, finds where each term is mentioned, and saves the answer on the term in a field. The page just draws the links from that field. Compute offline, store as a field, render from the field: that pattern works on any CMS with custom fields.

Compared with a crawl from August, before the redesign and the blocks, links from blocks went from 926 to 7,483 (content and blocks only, no menus), and posts, terms and resources with no links went from 19 to zero. Each glossary term became an entity hub: one page per idea, linked with the same name from everywhere it’s mentioned. I make the longer case for that structure in entity hubs over keyword landing pages.

What to watch for

  • Anchors are often generic, usually the page title, and the links sit around the content rather than inside a sentence. Blocks give you structure, and they give less context than a saved sentence link.
  • Two blocks can disagree. On one of my posts, the sidebar card picks a course by topic and the block under the article picks one by author. Decide which rule wins, or label them so readers know why each one is there.

Tools that work this way: your CMS’s templates and queries. On Shopify, theme sections plus metafields; on Webflow, multi-reference fields and collection lists; on a static site, components and the generator’s own features, such as Hugo’s related content. None of these needs a plugin.

How to undo it: change the template. That’s one edit and it affects every page using it. Build blocks so they’re easy to switch off.

The three ways side by side

Rules when the page loadsSaved into the contentTemplate blocks
Where the link livesAdded on the way out (server, edge or browser)In the stored post bodyIn the template, around the content
PrecisionMedium: every mention of a phraseHigh: one sentence at a timeLow: generic anchors
CoverageMediumLow: one row at a timeHigh: every page, from day one
UndoOne switch, then purge the cacheNeeds a change logOne template edit
What you needA CMS that lets you change HTML on the way out, a build step or an edge workerAn API or plugin that can write to contentAccess to templates and fields
What a database export showsNothingThe linkNothing (only the field data)
How a crawl sees itIn the HTML if server-side or edge; only after rendering if added by JavaScriptIn the HTMLIn the HTML, if the template renders on the server

The last two rows matter more than they look. Which access you have often makes the choice for you on a first implementation.

Which way fits your site, team and CMS

You don’t have to pick one. Every site I run uses all three, for different jobs: blocks for structure, rules for names and terms that should always point to one page, and saved links for high-value, sentence-level links. The real decision is the mix, and which one to build first.

On my three sites the mix follows what each site needs to connect. mlforseo.com is mostly blocks, because the glossary, courses and resources all need to connect. datastudioformarketers.com is mostly rules, because it mentions hundreds of tools and partners. lazarinastoy.com has a small set of rules, each pointing a topic at its cornerstone post once per page. That’s one example of a mix, and yours should follow your own money pages and the pages only your site has. If you’re still deciding which pages those are, my guide to blog and site architecture in the AI search era starts there.

Common starting points:

  • A small WordPress blog run by one person: start with rules. Coverage comes fast and the undo is one switch.
  • A Shopify store: start with blocks on product and collection templates, then save links into blog articles through the Admin API. My Shopify internal linking guide covers where links can live on a store.
  • A headless or static site with developers: apply rules at build time from a rules file, and use components for blocks. The headless and static guide shows how links are stored in structured rich text.
  • A Webflow site: reference and multi-reference fields with collection lists are your blocks, and the Data API writes links into rich text. See the Webflow guide.
  • An enterprise CMS where you can’t install anything: save links through whatever API exists, in reviewed batches, or ask the development team for a template change that adds link blocks.

How to check each way with a crawl

Whichever way you choose, a crawl is the only check that sees all three. Three things to look at:

  1. Raw HTML vs rendered HTML. Crawl once without JavaScript rendering and once with it. Links that only exist in the rendered version were added in the browser. In Screaming Frog, the paid version’s Contains JavaScript Links filter lists exactly those pages. For a single URL, my free internal link checker shows which links are in the server HTML, which only appear after JavaScript, and which have no href.
  2. Where each link sits. Label links by position (content, block, sidebar, navigation) so you can count what each way added. Google’s own link guidance is the baseline: an a element with an href.
  3. Before and after counts. Unique inlinks per page from a crawl before the change and a crawl after it. If the pages you linked didn’t gain inlinks, the links didn’t ship, whatever the plugin says.

For render-time rules, purge the cache before you crawl. For saved links, compare the crawl with your change log. For blocks, check a page published after the template change.

Did it work? Measure against a control group

Here’s an honest note from my own case study. After the link blocks went live, the glossary’s Search Console clicks were three and a half times what they’d been in the previous 28 days, and impressions went from about 39,000 to 136,000. The share of glossary pages indexed went from roughly 40% to 90% or more. I’d love to say links did all of that. I can’t: the same week, I expanded the content on some glossary pages, the whole site was redesigned, and I didn’t hold back a control group.

That’s why I built the free internal linking measurement template. You split comparable pages into test and control before you ship, add links to the test pages only, and the workbook compares the change in clicks, impressions and position for both groups, plus the inlinks change from two crawls, so you know the links actually shipped. It’s a simple difference-in-differences, and it’s a much fairer read than a plain before and after. On its synthetic sample site, test pages grew 6.8% in clicks per day while control pages fell 5.5% over the same weeks: a plain before/after would have hidden half of the effect.

Where the course takes this further

This guide covers the three ways, what each is good at and how to check them. In AI-powered Internal Linking Audit and Automation, Sam Torres‘s course, I teach Module 5, “Shipping Links in Your CMS: WordPress and Beyond”, which turns this into something you can implement end to end: how a link menu becomes linking rules, a REST API writer with a dry run, a change log and a rollback, the full mlforseo.com link-blocks case study, and implementation guides for headless, Shopify and Webflow sites. Sam’s modules around it cover building the link menu, QA before links ship, and measuring the impact properly in Module 7. You can see the full curriculum on the course page.

Free template

Internal linking measurement template: page groups, a control group, inlinks change and a difference-in-differences on Search Console clicks and impressions, with a worked sample.

Frequently asked questions

What is automatic internal linking?

Automatic internal linking means links are added by software instead of by hand. That can be a rule that links a phrase wherever it appears, a tool that writes approved links into your posts, or a template block such as related posts. Each puts the link in a different place, which changes how you undo it and whether crawlers see it.

Are internal links added with JavaScript bad for SEO?

Google renders JavaScript and parses links from the rendered HTML, so it can find them, though rendering can take longer than the first crawl. Crawlers that don’t run JavaScript won’t see them. If you can, add links on the server, at build time or at the edge, and check with a crawl that compares raw and rendered HTML.

What happens to the links if I uninstall an internal linking plugin?

It depends on where the links live. Links saved into your content stay in your posts. Links a plugin adds when the page loads disappear when you switch it off, and links a JavaScript snippet adds stop showing when the snippet goes.

Which way should I start with?

Start with the way your access allows and your site needs most. Blocks give the widest coverage for the least work on big sites, rules are the quickest win on small ones, and saved links are for the sentence-level links that matter most. Most sites end up using all three.

MLforSEO Academy

Pick your learning path

Start with the course that goes deepest on this article, then more courses taught by Lazarina Stoy, most relevant first.

Recommended with this article

AI-powered Internal Linking Audit and Automation

by Sam Torres with Lazarina Stoy

Audit how your site links to itself, find the pages and entities your links leave out, and plan and automate the fixes with AI at scale.

View course · €350 →

Introduction to Machine Learning for SEO

by Lazarina Stoy

Go from zero to running your first ML workflows for SEO: classification, clustering, entity extraction, fuzzy matching and content transformation.

View course · €250 →

Semantic AI-powered SEO Keyword Research

by Lazarina Stoy with Beatrice Gamba

Build a semantic keyword universe and an automated content-brief workflow, from query understanding through SERP analysis to delivery.

View course · €400 →

AI Search & LLMs: Entity SEO and Knowledge Graph Strategies for Brands

by Beatrice Gamba with Lazarina Stoy

Win in both traditional Google and LLM-driven search by mastering entities, brand recognition, and knowledge graph integration.

View course · €200 →

The AI-powered Entity Audit

by Lazarina Stoy

A complete, repeatable entity audit you can run on any site. Built on the 5Cs of entity representation and demonstrated end to end on a real, unedited site.

View course · €150 →
Bundle & save up to €200 →See all 6 courses →Already an Academy member? Use Community30 for 30% off your next course or bundle.