# Add contextual links

- Check 12.10 · Internal linking · Important
- Source: https://checklist-seo-geo.com/en/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.
- Updated on 2026-11-25
- Licence: CC BY 4.0. Credit “Checklist SEO & GEO” with a link to https://checklist-seo-geo.com/en/internal-linking/add-contextual-links.
- Plugin checklist-seo-geo: 1.3.1 · https://github.com/maximegaul/checklist-seo-geo

## 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](https://checklist-seo-geo.com/en/internal-linking/pass-link-equity-strategic-pages).
- **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](https://search.google.com/search-console/links), 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](https://checklist-seo-geo.com/en/strategy-keyword-research/build-keyword-page-map) or the list of [priority commercial pages](https://checklist-seo-geo.com/en/internal-linking/identify-priority-commercial-pages). 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](https://checklist-seo-geo.com/en/internal-linking/use-descriptive-varied-anchor-text).

### 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:

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

Then save the script as `occasions.py`:

```python
#!/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)
```

```bash
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.

### Step 3 — Place each link in the right spot

Placement rules, all of them professional conventions:

- **In a sentence that explains the relationship**: “If your boiler is more than ten years old, first compare [the cost of replacing a boiler](…)”. No stand-alone link at the end of a paragraph.
- **At the first useful mention**, preferably in the part of the text readers actually reach.
- **One link per target per page** is usually enough. Repeating the same link three times does nothing for the reader.
- **An anchor that describes the target page**, not “click here”. See [avoid generic anchors out of context](https://checklist-seo-geo.com/en/internal-linking/avoid-generic-anchors-out-context).
- **To the final URL**, returning a 200, with no redirect. See [fix links to redirects or non-canonical URLs](https://checklist-seo-geo.com/en/internal-linking/fix-links-redirects-non-canonical-urls).
- **In both directions when relevant**: the guide links to the commercial page, the commercial page links to the guide that helps people choose. See [link guides and commercial pages](https://checklist-seo-geo.com/en/internal-linking/link-guides-commercial-pages).

| 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 |

### Step 4 — Add the links in your tool

### 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](https://checklist-seo-geo.com/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:

```tsx
// 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](https://checklist-seo-geo.com/en/internal-linking/identify-most-visible-pages) and [identify pages that earn backlinks](https://checklist-seo-geo.com/en/internal-linking/identify-pages-that-earn-backlinks).

## 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](https://checklist-seo-geo.com/en/practices-avoid/eliminate-manipulative-hidden-text-links).
- **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.

### Does an in-text link count more than a menu link?

Google does not publish any weighting based on a link's position. It does state, however, that the anchor and the words around it matter, and a link placed in the text of a page on a related topic provides that context, which a menu identical across the whole site does not. Keep both: the menu for structure, contextual links for the relationships between topics.

### Should I use a plugin that adds internal links automatically?

An automatic internal linking plugin saves time on a large site, but it quickly produces repeated anchors and off-topic links. Prefer a tool that suggests, such as the suggestion features in Yoast SEO Premium or Rank Math, and approve each link by hand. Avoid rules that link every occurrence of a keyword across the whole site.

### Should internal links open in a new tab?

No, open internal links in the same tab, except in special cases such as a form being filled in. Opening in a new tab has no effect on SEO, but it breaks the Back button and multiplies tabs, which many visitors do not expect from a link to another page on the same site.

## Resources

- [Google Search Central: Link best practices](https://developers.google.com/search/docs/crawling-indexing/links-crawlable?hl=en)
- [Google Search Central: Ecommerce site structure](https://developers.google.com/search/docs/specialty/ecommerce/help-google-understand-your-ecommerce-site-structure?hl=en)
- [Search Console Help: Links report](https://support.google.com/webmasters/answer/9049606?hl=en)
- [Screaming Frog SEO Spider: user guide](https://www.screamingfrog.co.uk/seo-spider/user-guide/)
- [Drupal: Linkit module](https://www.drupal.org/project/linkit)
- [Next.js: MDX](https://nextjs.org/docs/app/guides/mdx)

Next steps: [use descriptive and varied anchor text](https://checklist-seo-geo.com/en/internal-linking/use-descriptive-varied-anchor-text) and [identify under-linked pages](https://checklist-seo-geo.com/en/internal-linking/identify-under-linked-pages).
