Documentation
Everything you need to install, configure, and get the most out of Auto Internal Linker.
Requirements
- WordPress 5.0 or higher
- PHP 7.4 or higher (PHP 8.x recommended)
- At least 5 published posts for the index to be useful
- Claude AI Mode (optional): Anthropic API key — console.anthropic.com
Installation
- 1Download the plugin
Purchase a licence and download
auto-internal-linker.zipfrom your confirmation email or Lemon Squeezy order page. - 2Upload in WordPress admin
Go to Plugins → Add New → Upload Plugin. Select the ZIP file and click Install Now.
- 3Activate the plugin
Click Activate Plugin. The plugin immediately begins building the keyword index in the background.
- 4Enter your licence key
Go to Settings → AIL License and enter the licence key from your purchase email.
- 5Open settings
Navigate to Settings → Auto Internal Linker. Review defaults — they are safe for most sites out of the box.
- 6Rebuild the index
Click Rebuild Index Now. Watch the keyword count appear. For 90 posts, expect 200–400 keywords.
Open any published post in your browser. Scroll past the first paragraph — you should see auto-links in your theme's link colour.
Quick Start
The defaults work well for most sites. Three things worth tuning immediately after install:
1. Customise your blacklist
Add words that appear in many post titles but shouldn't become anchors. For a cooking site: recipe, easy, best, simple, homemade. Go to Settings → Blacklist, add one per line, save and rebuild.
2. Set anchor length
The default is 1–3 words. Set Min anchor words to 2 to prevent single-word anchors like "diving" or "reef" from being linked.
3. Verify on a post
Open a long post (800+ words). You should see 3–6 auto-links in the body, skipping the first paragraph and all headings.
All Settings
All settings at Settings → Auto Internal Linker in your WordPress admin.
Link Behaviour
| Setting | Default | Description |
|---|---|---|
| max_links_per_post | 6 | Maximum auto-links per post. Recommended: 5–8 depending on post length. |
| max_links_per_kw | 1 | How many times the same keyword can be linked within one post. |
| link_target | _self | Open links in the same tab (_self, good for SEO) or new tab (_blank). |
Spacing & Placement
| Setting | Default | Description |
|---|---|---|
| min_words_between | 100 | Minimum word gap between any two auto-links. |
| skip_first_n_paras | 1 | Skip the first N paragraphs. Keeps intros clean. |
| skip_headings | On | Skip all h1–h6 headings. |
Keyword Index
| Setting | Default | Description |
|---|---|---|
| min_keyword_length | 4 | Minimum character length for a keyword to be indexed. |
| min_anchor_words | 1 | Minimum words in an anchor phrase. Set 2 to prevent single-word anchors. |
| max_anchor_words | 3 | Maximum words in an anchor phrase. |
| extraction_mode | smart | smart (colon split) or claude (AI-powered). |
Changes to keyword index settings only take effect after clicking Rebuild Index Now.
Smart Mode
Smart Mode splits post titles at the colon and treats the part before the colon as the primary keyword source.
Example
Title: "Whale Sharks: A Complete Guide to Swimming With Giants"
Before colon → "Whale Sharks"
Extracted anchors:
• "whale sharks" ← primary 2-word phrase
• "whale" ← single word (if min_anchor_words = 1)
After colon → shorter phrases only, boilerplate filtered
• "complete guide"
Sites with consistently formatted titles like Topic: Subtitle. If your titles don't use colons, consider Claude AI Mode.
Claude AI ModeAI
Claude AI Mode sends each post title to the Anthropic Claude API and receives back 3–6 high-quality keyword phrases with full semantic understanding — not just word patterns.
Setup
- 1Get an Anthropic API key
Sign up at console.anthropic.com. Add a small credit ($5 will index thousands of posts).
- 2Enter the key in settings
Go to Settings → Auto Internal Linker → Extraction Mode → Claude AI Mode. Paste your API key.
- 3Rebuild the index
Click Rebuild Index with Claude AI. May take 5–30 seconds depending on post count.
Cost
Uses the claude-haiku-4-5 model — the fastest and most affordable in the Claude family.
| Posts | Estimated cost |
|---|---|
| 100 posts | ~$0.005 |
| 1,000 posts | ~$0.05 |
| 10,000 posts | ~$0.50 |
The index rebuilds once daily and on each post save — not on every page load.
Blacklist
The blacklist prevents specific words from being used as anchor text. One word or phrase per line. Case-insensitive.
Examples
# Generic words
guide
best
how to
tips
# Niche-specific (travel site)
australia
queensland
travel
visiting
Blacklist changes only take effect after rebuilding the index.
How the Keyword Index Works
On activation (and once daily), the plugin queries all published posts, extracts keyword phrases from each title, and stores the resulting keyword → {post_id, url, title} map in wp_options. No custom database tables are created.
The index also rebuilds whenever a post is saved or deleted, and when you click Rebuild Index Now.
Keywords are sorted longest-phrase-first so "whale shark season" is tried before "whale shark" before "whale" — the most specific phrase always wins.
How Link Injection Works
The plugin hooks into WordPress's the_content filter at priority 20. On each page load:
- Split into paragraphs — at
<p>boundaries - Skip early paragraphs — first N passed through untouched
- Split into text nodes — at HTML tag boundaries
- Skip tags — existing
<a>and<h1>–<h6>skipped - Match keywords — each text node checked against the index
- Enforce limits — word gap, per-post max, per-keyword max, self-link check
- Inject link — keyword wrapped in
<a>tag
Injected HTML is never saved to the database. Deactivate the plugin — original content reappears immediately, unmodified.
Regex Matching
Uses explicit lookbehind/lookahead instead of \b word boundaries:
/(?<![a-zA-Z0-9\-])(keyword phrase)(?![a-zA-Z0-9\-])/iu
This prevents partial matches inside hyphenated words. The i flag enables case-insensitive matching; the u flag enables full Unicode support for international sites.
Text nodes are decoded with html_entity_decode() before matching so that HTML entities like ’ (curly apostrophe) are never split by the regex.
FAQ
No. All injection happens via the the_content WordPress filter on each page load. Your original post content is never touched. Deactivate the plugin and all auto-links disappear instantly.
Check: (1) Is your licence active? Settings → AIL License. (2) Is the index built? Check keyword count. (3) Does your post have enough words? The word gap (100 words default) means short posts may get no links. (4) Are all keywords on the blacklist?
A common SEO guideline is one internal link per 200–300 words. For 1,000 words, 3–5 links is natural. The default of 6 is conservative. Avoid going above 10.
It works with any theme or builder that uses the standard WordPress the_content filter, which includes Elementor, Divi, Beaver Builder, and most others.
The overhead per page load is under 5ms. The index loads from wp_options (one cached DB read) and all processing is in-memory.
All auto-links disappear — because they were never saved to the database. The plugin also clears the index from wp_options on deactivation.
Yes. Go to Settings → AIL License, click Deactivate License to free a slot. Then activate on the new site.
Troubleshooting
No links appearing at all
- Check licence status: Settings → AIL License
- Check keyword count — if 0, click Rebuild Index Now
- Make sure you're viewing a single post, not a category or homepage
- Disable other SEO plugins temporarily to check for conflicts
Broken apostrophes or special characters
Update to v1.3.1 or later. Fixed in v1.3.1+.
Too many links / looks spammy
- Reduce Max links per post to 4–5
- Increase Min words between links to 150–200
- Set Min anchor words to 2
- Expand your blacklist
Claude AI Mode not working
- Check your API key starts with
sk-ant-and has credits - Check console.anthropic.com for usage and errors
Index not rebuilding automatically
The daily rebuild uses WordPress cron (wp-cron.php). If your host disabled WP-Cron, trigger a manual rebuild via the settings panel, or set up a real server cron.
Changelog
See the full Changelog page for detailed release notes.
v1.4.0 — March 2026 Latest
- Licence key system via Lemon Squeezy
- Settings → AIL License admin page
- Background licence validation via daily cron
- Admin notice when licence inactive or expired
v1.3.1 — March 2026
- Fixed: HTML entities corrupted by regex matching
v1.3.0 — December 2024
- Min/Max anchor words setting
- Skip headings option
v1.2.0 — November 2024
- Smart Mode and Claude AI Mode
- Searchable keyword preview
v1.1.0 — October 2024
- Renamed to Auto Internal Linker
- Fixed partial word match bug
v1.0.0 — September 2024
- Initial release