How to add internal links in WordPress

Key takeaways

  • WordPress’s link control checks that a URL is formatted correctly, not that the page exists. Open the published page in a private window and click every new link.
  • Never link to a URL containing /wp-admin. Copy the public address, and make it match the version your site serves (www or not, trailing slash or not) so it doesn’t go through a redirect.
  • Section links need an HTML Anchor set under the block’s Advanced panel. Anchors are case-sensitive, have no spaces, start with a letter and must be unique on the page.
  • Yoast’s warning ‘No internal links appear in this page’ can be wrong. It often misses links in menus, page builders and custom fields that search engines still crawl.
  • There is no ideal number of links per post. Ahrefs found that 66.2% of sites in a study of over a million domains had at least one page with only one dofollow internal link pointing at it.

Adding an internal link in WordPress takes about ten seconds: select the words, press Ctrl+K, pick the page. The link itself rarely goes wrong. The things around it do: a URL copied from the edit screen, a slug renamed last spring, an anchor with a capital letter in the wrong place, or a plugin warning that says the links you can see aren’t there.

This guide covers the editor steps, then the cases the editor doesn’t handle: section links, menus, WooCommerce products, and what to do when a link breaks. Internal links are one part of the wider job of doing SEO on WordPress. They are also the part that slowly goes stale on any site that keeps publishing.

What you need before you start

You need an account that can edit the post or page, and the destination has to be published. A link to a draft takes logged-out visitors to a 404. If the destination doesn’t exist yet, create and publish the page first, and settle its slug before anything links to it.

These steps are for the block editor. In the Classic Editor, the link button in the toolbar does the same job.

How do you add an internal link in the block editor?

  1. Select the words that describe the destination. Choose “business audit checklist”, not “here”. The link should sit in the sentence where the reader would want the next step.
  2. Open the link control. Press Ctrl+K (Cmd+K on a Mac) or click the link icon in the block toolbar.
  3. Search or enter the destination. Type part of the post or page title and WordPress searches your own content. Pick the correct result, and look twice when two titles are similar. You can also paste a full URL, a relative path like /about, or an anchor on the same page like #contact.
  4. Leave the advanced options off. For an internal link, “Open in new tab” and nofollow should normally stay unticked.
  5. Press Enter, then Save or Update the post.
  6. Test it as a visitor. Open the published page in a private window and click the link.

Step six is the one people skip, and it is the one that catches mistakes. WordPress’s Link control documentation says the editor checks whether a URL is formatted acceptably. It does not check whether the page exists or loads. A typo in a slug looks fine in the editor and returns a 404 on the live site.

Why you should select words before pasting a URL

If you paste a bare URL on its own line, the editor may turn it into an embed or a preview card instead of a text link. WordPress’s documentation warns about this. Select the words first, then add the link to them.

Why you should never link to an admin URL

A URL copied from the address bar while you are editing looks like /wp-admin/post.php?post=123&action=edit. It works for you because you are logged in. For everyone else it goes to a login screen. A thread on WordPress.org’s support forums turns on exactly this mistake. Open the page itself in a private window and copy that address.

Match the exact version your site serves. If your site uses https://www.example.com/pricing/, a link to http://example.com/pricing still arrives, but only after one or two redirects. Visitors and crawlers both pay for each hop.

What does a correct internal link look like?

In the page source, a correct internal link is a plain anchor element with an href, descriptive text and no extra attributes:

<a href="https://www.example.com/services/business-audit/">business audit service</a>

Google’s link best practices page says Google uses links to find new pages to crawl and as a signal of relevance, and asks for crawlable links with descriptive anchor text. Accessibility asks for the same thing. WCAG 2.2 success criterion 2.4.4, Level A, requires that a link’s purpose be clear from its text or the text around it. “Click here” fails, and so does an empty link around an icon.

Don’t add nofollow to internal links. WordPress describes nofollow as telling search engines not to associate with or crawl the linked page from your site. That is almost never what you want for your own pages. It also doesn’t fix a broken link or remove a page from search.

How do you link to a section of a page?

You give the section an HTML anchor, then link to it with a hash.

  1. Select the heading (or other block) you want to jump to.
  2. In the block settings sidebar, open Advanced and type a name in HTML Anchor, for example pricing-faq.
  3. Link to #pricing-faq from the same page, or to https://www.example.com/pricing/#pricing-faq from another page.

WordPress’s Page Jumps documentation sets the rules: anchors are case-sensitive, contain no spaces, start with a letter and must be unique on the page. If clicking a jump link takes the reader to the top of the page instead of the section, the anchor and the link don’t match exactly. #Pricing-FAQ and #pricing-faq are different anchors.

Where are menu and WooCommerce product links set?

Menus are a separate system

A link inside a post never becomes a menu item, and a menu item doesn’t count as a link in your article. In a block theme, edit menus in the Navigation block (Appearance, then Editor, then Navigation) and add a page link or a Custom Link. Classic themes use Appearance, then Menus. Both kinds of link matter, but only contextual links in the body tell readers and search engines which specific pages relate to this one.

WooCommerce has three kinds of product link

To link to a product inside a post, use an ordinary link to the product’s public URL. Recommendations work differently. WooCommerce’s documentation explains that you choose up-sells and cross-sells by hand in the product’s Product data panel, under Linked Products. WooCommerce generates related products automatically from shared categories and tags, so you can’t pick them one by one. Whether these lists appear, and where, depends on your theme.

Product URLs follow the product permalink setting under Settings, then Permalinks. If you change it on an established store, every product link typed into posts points at the old structure. Add redirects and update those links in the same session.

WooCommerce Linked Products tab with up-sells and cross-sells fields
Under the Linked Products tab, store managers can manually search and designate specific items for up-sells and cross-sells. · Source: woocommerce.com

Which pages should you link, and how many links?

There is no correct number. Guides recommend anything from two links per post to one every 50 words, and none of those figures comes from a controlled test. Two rules hold up better: link where the reader would want to go next, and make sure every page you care about has at least one link to it from the body of another page.

Many sites miss the second rule. In Ahrefs’ study of over a million domains, 66.2% of sites had at least one page with only one dofollow internal link pointing to it. Note that the figure is for sites, not pages. Still, under-linked pages are common.

A habit that scales well with a small archive:

  • When you publish, link the new post to two or three older pages it builds on.
  • Then open those older pages and link back to the new one where it adds something.
  • Link from service, product or category pages only where the sentence supports it. A related offer at the right moment helps readers. A forced one reads like an ad.
  • Once a quarter, use a crawler or your SEO plugin’s link report to find pages with no inbound links, and give each one a home.

Plugins that suggest or auto-insert links save search time on large archives. Practitioners regularly report irrelevant suggestions and repetitive anchors, and AI tools that make up URLs or break HTML. Treat every suggestion as a draft and read the sentence it lands in before you accept it.

Why does Yoast say there are no internal links when there are?

Yoast’s content analysis shows “Internal links: No internal links appear in this page, make sure to add some!” even on pages with several links. One WordPress.org support thread opens with exactly that complaint about a post with at least three links. The usual reason is where the links sit. Yoast reads the post content, so links in menus, footers, sidebars, some page builder modules and custom fields often aren’t counted. Yoast’s support has said search engines can still crawl those links.

So trust the page, not the counter. If you want the warning gone:

  • Put at least one link in a normal paragraph in the editor, not in a builder module or custom field.
  • Check that the Site Address under Settings, then General, matches your live URL, including https and www. A mismatch can make your own links look external.
  • Run Yoast’s SEO data optimization from the Yoast SEO tools screen.

Yoast’s link suggestions in the editor are a Premium feature, and Yoast’s help page says to run the data optimization first. If you don’t see suggestions on the free version, nothing is broken.

What to do when an internal link doesn’t work

Find out what the destination returns, then match the fix to the cause.

  • 404 after a slug change. Add a 301 redirect from the old URL to the new one, then update the links that still use the old path. A redirect is a safety net, not a replacement for correct links. A helpful custom 404 page catches the visitors you miss.
  • 404 because the page was deleted. Redirect to a page that answers the same need. If none exists, remove the link.
  • Every pretty URL returns 404. Open Settings, then Permalinks, and click Save Changes without changing anything. WordPress rebuilds its rewrite rules. This fixes rewrite problems only. It won’t fix a typo or a deleted page.
  • The editor misbehaves. If the URL disappears after Ctrl+K, or nofollow gets added when you didn’t choose it, a theme or plugin is interfering. Run a conflict test, switching to a default theme, turning all plugins off and turning them back on one at a time, as described in our guide to plugins that stop working.
  • Links point at the old domain after a migration. They may still work through redirects, but each one takes a detour. A database search-and-replace from the old domain to the new one fixes them all at once. Take a backup first. If the original domain is carrying over to the rebuilt site, keep linking to it rather than to the temporary staging address.

If you’d rather not do this cleanup page by page, SiteSelf takes it as a chat request: it updates the links, adds redirects and other SEO fixes on your site, and reports what changed and what it checked.

Stop and get help when links break across the whole site after a migration or host move, or when the editor fails the same way with every plugin off and a default theme on. At that point the cause is in the server, the database or WordPress itself, and it needs someone with hosting access.

Frequently asked questions

Should internal links open in a new tab?

Usually not. The reader is staying on your site, and a new tab breaks the back button they expect to use. If you do open a link in a new tab, W3C lists telling users in advance as an advisory technique, for example by adding “(opens in a new tab)” to the link text.

Should I use relative paths or full URLs?

Both work in a browser, and the link control accepts paths like /about. Full URLs are easier to search and replace after a domain change and behave the same in feeds and emails. Whichever you use, use it consistently.

How do I edit or remove a link?

Click the linked text in the editor. A small popover shows the destination with buttons to edit it or remove the link. Removing the link keeps the words. Then update the post.

Do internal links improve rankings?

They help search engines find pages and understand which pages relate to each other, and Google says it uses them as a relevance signal. No public controlled study shows that adding a set number of links lifts a given page. Reports of traffic gains after linking work usually come with other changes made at the same time.

Does every WooCommerce product need links from other products?

No. Store owners disagree about product-to-product linking, and linking every product to every other one looks spammy to shoppers. Relevant links from guides and category pages, plus up-sells and cross-sells chosen with care, do the job.

Can I change the same link across many posts at once?

Core WordPress has no bulk link editor. On a small site, search your posts for the old URL and edit each result. On a large one, a database search-and-replace is faster, but take a backup and test a single post first.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *