Sub topic 8
What Internal Links Do
This chapter assumes you know basic HTML, including the a element and its href attribute. It also assumes you know how a browser requests a page over HTTP, and that you have read the previous chapter on how search engines find pages through links. An internal link is a link from one page on your site to another page on the same site.
Three jobs of an internal link
Every internal link does three things at once.
- Discovery. A crawler fetches a page, extracts its links, and adds the targets to its queue. A page that no other page links to can only be found through other sources, such as a sitemap or an external link. Such a page is an orphan page.
- Context. The anchor text and the surrounding sentence describe the target page. The search engine uses this description, along with the target's own content, to understand what the target is about.
- Emphasis. Pages that receive many internal links from important pages are signaled as more important on your site. You decide this by choosing where to link. Search engines do not publish an exact formula, so treat it as a tendency rather than a guarantee.
Readers get a fourth benefit. Internal links are how people move from an article to the next useful step.
In the diagram, the crawler reaches both articles by following links from the home page. It has no path to the orphan page.
A worked example
Suppose you publish a new article on canonical tags. Compare two ways of connecting it to the site.
<!-- In the guides hub page -->
<ul>
<li><a href="/guides/url-slugs/">Guide to writing URL slugs</a></li>
<li><a href="/guides/canonical-tags/">Guide to canonical tags</a></li>
</ul>
<!-- In an older article about duplicate content -->
<p>If the same page loads at several addresses, set a
<a href="/guides/canonical-tags/">canonical tag</a> to name the preferred one.</p>The hub link makes the new article discoverable from a page that is already crawled. The contextual link inside the older article adds a second path. It also tells the search engine that /guides/canonical-tags/ is about canonical tags, in a sentence where that topic is relevant.
What links do not do
- A link does not guarantee indexing. The search engine can crawl a page and still decide not to index it.
- More links are not always better. A page with hundreds of links in its body spreads attention thinly and is harder for readers to use.
- Internal links do not replace good content. They help a search engine understand a page. They do not make a weak page rank.
Common errors
| Problem | Why it hurts | Fix |
|---|---|---|
| Orphan page | The crawler has no path to it | Link to it from a relevant hub or article |
| Link to a redirected URL | Adds a hop, and may signal the old URL is still current | Link to the final URL |
| Link to a 404 page | Wastes crawl effort and frustrates readers | Update or remove the link |
| Link added only by JavaScript click handler | The crawler may see no link at all | Use an `a` element with an `href` (covered in a later chapter) |
| Same generic text for every link | Gives no description of the target | Write descriptive anchor text (covered in a later chapter) |
Planning links when you publish
Before you publish a page, answer two questions. Which existing pages should link to it? Which pages should it link to? The first question prevents orphan pages. The second gives readers and crawlers a way onward. Link where the reader would naturally want more detail, and do it in the body text rather than adding a block of links at the end.
Exercise
You publish a new page and add it to your XML sitemap, but no other page on your site links to it. Why is this still a problem, and what is the simplest fix?
Show answer
The page is an orphan. A sitemap can help a crawler find the URL, but with no internal links the page gets no context from anchor text and no emphasis from other pages, and readers cannot reach it by browsing. The simplest fix is to add a contextual link from a relevant existing page, or a link from the matching hub page, using an a element with a descriptive anchor.