Check 12.10 · Internal linking

Add contextual links

Find unlinked mentions of your key topics, add in-text links with a useful anchor and sentence, then make it a publishing rule.

Priority
Important
Difficulty
Easy
Estimated time
2 h to 1 day, then ongoing
Free, no account: your progress is saved in this browser.

Ask an AI to check this point on your site

Opens the assistant with a ready-made question: this check, its goal and your site URL.

For Gemini, Copilot or another assistant, copy the question. The link opens the chosen service directly: nothing goes through this site.

In short

A contextual link is a link placed in the body text, in the middle of a sentence, pointing to a page that covers the topic in more depth. The task is to find the places where your content mentions a topic without linking to the page that covers it, add a link with a descriptive anchor there, then build this habit into your publishing routine. Once done, every important page receives links from the content on its topic, not just from the menu.

Why it matters

Menus, the footer and breadcrumbs are identical on hundreds of pages: they say that a page exists, rarely what it is about in relation to the content that mentions it. An in-text link adds three more pieces of information: the anchor, the sentence around it and the source page itself, which covers a related topic.

Google says so in its link best practices: every page you care about should have a link from at least one other page on the site, and the words before and after the link matter, so the whole sentence deserves care. In its documentation on e-commerce site structure, it also states that a page receiving more internal links is seen as relatively more important, and recommends linking a flagship product from other content, such as blog posts.

For the visitor, a contextual link arrives at the moment the question comes up: “for the annual service, see our boiler maintenance contract”. AI assistants that browse a site to answer a question follow the same links; an explicit relationship between two pages helps them find the right one. No practice guarantees a citation.

What it improves

  • Discovery Recent or deep pages are found faster by bots, from pages that have already been crawled.
  • Topic understanding The anchor and the sentence clarify what the target page covers. An indirect effect on rankings, not measurable on its own.
  • Link equity distribution Pages that receive external links or traffic pass part of it on to the pages they mention. See pass link equity to strategic pages (opens in a new tab).
  • User journeys More pages viewed per visit and more visitors moving from guides to commercial pages, measurable in Google Analytics or Matomo.
  • AI answers Relationships between pages are easier to read for bots that follow links. A plausible effect, not proven.

How to check

With Screaming Frog (free up to 500 URLs): crawl the site, select a strategic page and open the Inlinks tab at the bottom. The Link Position column classifies each inbound link (navigation, header, content, sidebar, footer). Count the links in the “Content” position coming from distinct pages. If a commercial page receives only navigation links, it lacks contextual links.

With Search Console: the Links report, internal links section, shows which pages link to a given page. It is a sample, useful for a first check.

By hand: search site:example.com "boiler maintenance" in Google. Open the pages that mention it and see whether they link to the reference page. The site: results are not exhaustive, but they are enough to find the first opportunities.

Compliant result: every page on the strategic list receives links in the “Content” position from several pages on its topic, and every piece of editorial content links to at least one page that takes its topic further. Search engines recommend no particular number of links.

How to implement

The examples follow three fictional companies: Plomberie Garnier (a plumbing and heating contractor in Nantes), Thé des Lisières (an online shop selling loose-leaf teas) and Planifia (field service scheduling software).

Step 1 — List the targets and their phrases

Start from the keyword-to-page map (opens in a new tab) or the list of priority commercial pages (opens in a new tab). For each target page, note two to five phrases that naturally refer to it in a text:

Target page Phrases to look for
/entretien-chaudiere-nantes/ boiler maintenance, annual service, maintenance contract
/thes/the-vert/ green tea, sencha, Japanese green teas
/fonctionnalites/planning-techniciens/ technician schedule, job scheduling

This table also serves as a pool of varied anchors. See use descriptive and varied anchor text (opens in a new tab).

Step 2 — Find unlinked mentions

With Screaming Frog: before the crawl, open Configuration > Custom > Custom Search and add one “Contains” rule per phrase (“boiler maintenance”). After the crawl, the Custom Search tab lists the pages containing each phrase. Compare this list with the target page's Inlinks tab: pages present in the first and missing from the second are your opportunities. Limit the search to the main content if the phrase also appears in the menu.

With Ahrefs or Semrush: Ahrefs' Site Audit offers an internal link opportunities report, which finds pages mentioning the keywords another of your pages ranks for. It is available for free for a site verified with Ahrefs Webmaster Tools. Labels change over time: refer to the tool's help center.

Without a paid tool: this dependency-free Python script reads your sitemap, looks for each phrase in the text of the pages and flags those that do not yet contain a link to the target. First create a cibles.csv file:

expression;cible
boiler maintenance;/entretien-chaudiere-nantes/
maintenance contract;/entretien-chaudiere-nantes/
green tea;/thes/the-vert/

Then save the script as occasions.py:

#!/usr/bin/env python3
"""Pages that mention a phrase without linking to the target page."""
import csv
import re
import sys
import time
import urllib.request

SITEMAP = sys.argv[1]


def get(url):
    request = urllib.request.Request(url, headers={"User-Agent": "occasions-liens/1.0"})
    with urllib.request.urlopen(request, timeout=15) as response:
        return response.read().decode("utf-8", "replace")


def page_urls(url):
    body = get(url)
    locs = re.findall(r"<loc>\s*([^<\s]+)\s*</loc>", body)
    if "<sitemapindex" in body:
        return [page for child in locs for page in page_urls(child)]
    return locs


with open("cibles.csv", encoding="utf-8") as handle:
    targets = list(csv.DictReader(handle, delimiter=";"))

writer = csv.writer(sys.stdout, delimiter=";")
writer.writerow(["page", "expression", "cible"])

for url in page_urls(SITEMAP):
    try:
        html = get(url)
    except Exception as error:
        print(f"# {url} : {error}", file=sys.stderr)
        continue

    text = re.sub(r"<(script|style|nav|header|footer)\b.*?</\1>", " ", html, flags=re.S | re.I)
    text = re.sub(r"<[^>]+>", " ", text).lower()

    for row in targets:
        cible = row["cible"]
        already_linked = re.search(r'href="(https?://[^/"]+)?' + re.escape(cible) + '"', html)
        if row["expression"].lower() in text and cible not in url and not already_linked:
            writer.writerow([url, row["expression"], cible])

    time.sleep(0.3)
python3 occasions.py https://example.com/sitemap.xml > occasions.csv

The script roughly strips out the menu, header and footer if they use the nav, header and footer tags. On a template that does not use them, review the results: a phrase that appears only in the menu is not an opportunity.

In WordPress: the related links feature of Yoast SEO Premium suggests content to link while you write; Rank Math also offers link suggestions in the editor, depending on the version and the modules enabled. These are suggestions: keep the ones that serve the sentence.

Placement rules, all of them professional conventions:

Avoid Prefer
“To find out more, click here.” “Japanese sencha takes water at 70 °C.”
Link on “boiler” to the home page Link on “annual boiler service” to the maintenance page
Ten links in the introduction Two to four links spread where they help

WordPress

Versions WordPress 6.4 to 7.1 (block editor and classic editor).

In the block editor, select the phrase, then press Ctrl + K (Cmd + K on Mac) or click the link icon. Type a few words of the target page's title: the editor suggests the site's published content. Pick the entry rather than pasting a URL, to avoid typos and old addresses. In the classic editor, the insert link button offers the same search.

Shopify

Versions Shopify admin, all plans, November 2026.

In Products, Collections, Content > Blog posts or Content > Pages, the rich text editor has a link button. Paste the address in the form /products/sencha-ariake or /collections/the-vert, without the /collections/…/products/… prefix, which creates a duplicate URL.

PrestaShop

Versions PrestaShop 8 and 9.

Product and category descriptions (Catalog) and CMS pages (Design > Pages) use a rich text editor with a link button. Use the page's current friendly URL, copied from the storefront.

Drupal

Versions Drupal 10 and 11, CKEditor 5, Linkit module 7.

CKEditor 5 offers a link button in rich text formats. Autocomplete on site content depends on the version.

Drupal 11.3 and later

Core offers link suggestions in CKEditor 5: select the phrase, click the link button, type a few words of the target page's title and pick it from the list. The Linkit module page invites sites to evaluate this core solution before installing the module.

Drupal 10 to 11.2

Install the Linkit module (7.0.x branch, compatible with Drupal 10.2 and later), which replaces the link button with a field that autocompletes on site content. Pick the page from the list rather than pasting a URL.

Wix

Versions Wix Editor and Wix Studio, November 2026.

Select the text in the editor or in the blog post editor, click the link icon and choose a site page or a blog post rather than typing a web address by hand.

Webflow

Versions Webflow Designer, all site plans, November 2026.

In a rich text field or a text block, select the phrase, click the link icon and choose a page or a collection item from the site.

Laravel

Versions Laravel 11 to 13.

For Markdown content rendered by Str::markdown(), write root-relative links ([Japanese sencha](/thes/the-vert/)). For content stored in the database, store the target's identifier rather than the URL where possible, and generate the address with route() at render time: a changed slug no longer breaks anything.

Next.js

Versions Next.js 15 and 16 (App Router, @next/mdx).

In MDX, replace the a tag with next/link for internal links:

// mdx-components.tsx
import Link from 'next/link'
import type { MDXComponents } from 'mdx/types'

export function useMDXComponents(components: MDXComponents): MDXComponents {
  return {
    a: ({ href = '', children, ...props }) =>
      href.startsWith('/') ? <Link href={href}>{children}</Link> : <a href={href} {...props}>{children}</a>,
    ...components,
  }
}

The link remains a real <a href> in the rendered HTML, crawlable by bots.

Astro

Versions Astro 5 to 7.

In Markdown content collections, write root-relative links and use the same trailing slash form as the trailingSlash setting in astro.config.mjs.

Step 5 — Make it a publishing rule

Add these two lines to the checklist for every piece of content you publish:

  1. Outbound links: the new content links to the pillar page of its topic, to two to five related pieces of content and, when it helps the reader, to the matching commercial page.
  2. Inbound links: two or three existing pieces of content on the same topic get a link to the new content, the same day.

Keep a simple log, which helps you avoid always loading the same pages:

Source page Phrase Target page Anchor used Added on By
/blog/chaudiere-qui-fuit/ annual service /entretien-chaudiere-nantes/ annual service of your boiler 2026-11-25 Paul
/guides/choisir-the-vert/ sencha /thes/the-vert/ our loose-leaf Japanese senchas 2026-11-25 Léa
/blog/planifier-astreintes/ technician schedule /fonctionnalites/planning-techniciens/ technician schedule 2026-11-26 Marc

Tip: start with the pages that already receive traffic or external links. See identify the most visible pages (opens in a new tab) and identify pages that earn backlinks (opens in a new tab).

Common mistakes

  • Always linking with the same exact-match anchor: the text becomes artificial and the anchor no longer fits the sentence.
  • Adding links everywhere at once with an automatic linking plugin: off-topic links, repeated anchors, overloaded pages. Review every suggestion.
  • Linking to a page that does not answer the sentence: a “pricing” link to a page with no prices disappoints the reader.
  • Marking internal links nofollow: Google does not recommend it for your own pages, and the target page loses the link.
  • Hiding the link: same color as the text, a one-character anchor. See eliminate manipulative hidden text and links (opens in a new tab).
  • Forgetting older content: a new post linked from no existing page stays rarely crawled.
  • Pasting a staging URL or a URL with tracking parameters: the target page receives a link to a duplicate address.

Frequently asked questions

How many internal links should an article have?

No search engine publishes an ideal number of internal links per article; Google writes that there is no magic number. In practice, an article links to its pillar page, to two to five related pieces of content and, if it serves the reader, to a commercial page. The right criterion is usefulness: each link should answer a question the sentence raises, without repeating the same target.

Updated on

Topic checklist (PDF)

And now?

In the “Internal linking” topic

  1. Identify priority commercial pages
  2. Identify pages that earn backlinks
  3. Identify the most visible pages
  4. Pass link equity to strategic pages
  5. Link complementary content (cross linking)
  6. Link articles and pillar pages in both directions (top-down and bottom-up)
  7. Link guides and commercial pages
  8. Use descriptive and varied anchor text
  9. Avoid generic anchors out of context
  10. Add contextual links
  11. Remove unnecessary links
  12. Fix links to redirects or non-canonical URLs
  13. Fix broken links
  14. Check click depth
  15. Identify under-linked pages
  16. Suggest relevant related content
  17. Audit the internal link graph
  18. Set up top-down, bottom-up and cross internal linking