Home / Blog / How to add internal links in WordPress

Guide

How to add internal links in WordPress

Adding internal links is the fastest, most reliable SEO work you can do. Here are the three ways to do it on WordPress, and when to use each.

Learning to add internal links in WordPress is one of the most direct SEO tasks you can do. A good internal link takes 30 seconds to write and can move a stranded page from invisible to ranking within a crawl cycle. The problem is that most sites do not do this consistently, because the work is spread across too many places and too many ways to do it. This guide covers 3 main approaches: the Block Editor, plugins like All in One SEO and Link Whisper, and the REST API. Pick the one that fits your scale and your patience.

The simplest way is the one WordPress gives you out of the box. Open the post you want to edit, place your cursor in the text where you want the link, select the words you want to become the anchor, and click the link button in the Block Editor toolbar. WordPress will open a search box. Type the page title or a keyword, select the page from the search results, and click the apply button. The link is now in your post. Publish, and it is live. That is the full workflow in under 10 seconds.

Here is the step-by-step:

  1. Open the post in the WordPress Block Editor. You can edit an existing post or create a new one.
  2. Select the text that will become the clickable anchor. Highlight the words with your mouse or keyboard.
  3. Click the link button in the Block Editor toolbar. It usually looks like a chain link or labeled "Link." The Block Editor will open a Link Control panel.
  4. Search for the target page. Type the title, slug, or a keyword into the search box. WordPress queries your own posts and pages.
  5. Select the page from the dropdown results. Click on it.
  6. Confirm the URL. WordPress fills in the destination. Check that it is the right page. You can also paste a URL directly if you know it.
  7. Apply the link. Click the button to confirm. The anchor text is now a working link.
  8. Publish the post. Save your changes and the link is live in under 1 minute.

The Block Editor link search is fast. It searches your post titles and slugs, and it suggests recent posts at the top. If you are linking to a post published 3+ years ago, you might need to type its exact title or a specific keyword to find it. This is where the workflow breaks down at scale — you cannot remember which post covers that topic, and searching 1 by 1 is slow.

The other limitation is that you are creating a link from scratch. The Block Editor does not help you find the right page to link from, and it does not help you find a good phrase in your text to anchor to. Those are the genuinely hard parts of internal linking, and this method leaves them entirely to you — no suggestions, no cross-site scanning.

A shortcut is to use a plugin that watches as you write and suggests relevant pages to link to. The most popular options are All in One SEO, Link Whisper, and Yoast SEO (which includes a Linking module). These plugins analyze your post content and suggest related pages, then insert the links for you — typically suggesting 3–8 links per 1500-word post.

The upside is speed. You do not have to hunt for the page or write the anchor. The plugin does both.

The downside is loss of control. A plugin might suggest a link that does not fit the context, or use an anchor that reads awkwardly. When you use a plugin to auto-insert links, you are trading manual work for automation, but you are also trading your judgment for the plugin's judgment. Most plugins err on the side of adding more links rather than fewer, which can drift toward link-stuffing without you noticing.

The other issue is that plugins work forward — they suggest links as you write a new post. They do not usually go back and interlink your old posts, which is often where orphan pages hide. You end up running the plugin on new content but never fixing the stranded older pages. This is why most sites that rely on plugins for internal linking still end up with a head-and-tail problem: new posts (0–6 months old) are well-linked, old posts (18+ months) are orphaned.

Using the WordPress REST API

The most reliable way to add internal links at scale is to use the WordPress REST API, which lets an external tool query your site, identify pages that need links, and publish the changes programmatically. The WordPress REST API is the standard interface for 3rd-party tools to read and edit post content.

Here is how it works. A tool connects to your WordPress site using the REST API. It:

  1. Fetches your posts via the WordPress REST API /wp-json/wp/v2/posts endpoint. The endpoint returns post ID, title, content, slug, and date.
  2. Identifies a page that needs linking. This might be an orphan page (0 inbound internal links), a page with <2 internal links, or a page matching a keyword pattern.
  3. Searches the site content for a relevant source page — a post that is topically related and contains a phrase that could naturally become a link anchor.
  4. Inserts the link via a POST to the WordPress REST API /wp/v2/posts/{id} endpoint, editing the post content to include the new link. The request includes the updated HTML in the content field.
  5. Verifies the result by fetching the live page again and checking that the link is present in the HTML. This catch-and-verify step prevents silent failures.

The REST API approach is powerful because it decouples the work into stages. A tool can crawl your site, understand your content, and make decisions about which pages need links and where the best source is. It does the grunt work of finding good matches, which humans are slow at.

To use the WordPress REST API for linking, you need:

  • A WordPress site with REST API enabled (default on modern WordPress 5.0+).
  • Application Passwords enabled on your WordPress account. This is a security feature that lets you create a password-protected login just for the REST API, without exposing your main WordPress password. Application Passwords are separate from your login password and can be revoked without resetting your account.
  • Edit permissions for the user tied to that Application Password (typically Editor role or custom capability edit_posts).
  • A tool that knows how to build the requests. You can write this yourself (straightforward HTTP POST requests), or use a tool like recto that builds and verifies the links for you.

Here is a simplified example of how to edit a post via the REST API. You send a POST request to:

`` https://yoursite.com/wp-json/wp/v2/posts/{id} ``

With a body containing the updated post content:

``json { "content": "<p>Here is some text with a <a href=\"https://yoursite.com/target-page\">link to the target page</a> in the middle.</p>" } ``

You authenticate with your application password (HTTP Basic Auth), and WordPress updates the post.

The key difference from the Block Editor is verification. When you publish in the Block Editor, you assume the change took. When you use the WordPress REST API, a good tool will fetch the page again after publishing and confirm the link actually appears in the HTML. This catches 3 classes of failure: a cache is stale, a plugin stripped the link, or the REST API edit failed silently (returning a 200 but not writing the post).

When to use each method

The Block Editor is fine for a handful of links. If you are writing a new post and want to link it to 3–4 existing posts, select the text, click the link button, and move on. It is fast — 10 seconds per link. Use this for manual, 1-off edits.

Plugins are a good fit if you are adding links to new content (posts <7 days old) and you want suggestions as you write. They are less useful for fixing old content, because they do not go backward. Use this workflow for content creation; expect 3–8 suggested links per 1500 words.

The WordPress REST API makes sense at scale — when you have dozens (50+) of orphan pages to link, or when you want a tool to systematically work through your site and find the best linking opportunities. It is not something you do by hand; it is what automation does. Use this for 50+ links across your site.

Why verify after publishing

One step most people skip is checking that the link actually went live. You publish the post and assume it is live. In reality, 4 things can go wrong.

A caching layer (Redis, Varnish, page cache plugin, or CDN) might be serving stale content, delaying the link by 1–3600 seconds. A security or SEO plugin might strip the link because it sees it as spam. The WordPress REST API request might have failed silently, and the post might still be in draft status. The edit might have succeeded on the database but not on the cache layer.

This is why recto re-fetches the page after pushing a link through the WordPress REST API and checks the live HTML for the link. It is a small step, but it is the difference between knowing your links are live and thinking they are live. For a one-time manual link, it is overkill. For 50+ links, it is essential — even a small silent-failure rate across that many links means a missing link you never detect.

Internal linking at scale

If you have 100–500 pages and 5–10 orphan pages, the Block Editor is enough. If you have 1000+ pages, or you want to be systematic about internal linking instead of doing it ad-hoc, you need automation.

The 3 approaches each have a place. The Block Editor keeps you close to your content and costs 0 setup (built in). Plugins speed up the new content workflow and cost $30–200/year. And the WordPress REST API lets you fix the whole site — finding orphan pages (0–1 inbound links), choosing the best source, writing an honest anchor from text you already wrote, publishing it, and verifying the result. This is what good internal linking looks like at scale, and it is the only way most sites ever fix the gaps that are costing them search visibility.

Start by auditing which pages on your site have 0 inbound internal links (your orphans). Then decide whether you want to fix it by hand (10 links = 2–3 minutes), with a plugin (20+ new posts), or with a tool (50+ links across the site). The Block Editor will always be there. But if you are serious about SEO, you will find that as your site grows from 100 to 1000 pages, automation becomes not a luxury but a necessity.

Sources

  1. WordPress block editor link interface and search functionality — developer.wordpress.org
  2. WordPress REST API post endpoint for editing content — developer.wordpress.org
  3. Application passwords for WordPress REST API authentication — wordpress.org