Understanding Internal Linking

Internal links connect one page of a website to another page on the same website, helping visitors navigate related content and helping search engines discover and understand the site's structure.

Well-planned internal links make it easier to move between related tutorials, reference pages, categories, and supporting information. They also provide search engines with pathways for crawling pages and context about how different pieces of content are connected.

An internal link is a hyperlink that points from one page to another page or resource within the same website.

<a href="/html5/tutorials/seo/image-seo.html">Image SEO Guide</a>

Because the link points to another page on the same website, it is an internal link. A link that points to a different website is generally considered an external link.

Internal links can appear in navigation menus, page content, sidebars, breadcrumbs, related-content sections, footers, and many other parts of a website.

Search engines use links to discover webpages and understand relationships between content. An internal link can help a crawler find another page and provide context about the destination through the surrounding content and link text.

A page that is connected to the rest of the website through useful internal links is generally easier to discover than a page that has no incoming links from other site pages.

Internal linking also helps communicate site organization. Links between category pages, tutorials, reference pages, and related topics can show how individual pages fit into a broader subject.

The visible words inside a link are called anchor text. Good anchor text gives visitors useful information about the destination before they follow the link.

A descriptive link might be:

<a href="/html5/tutorials/images/alt-text.html">Learn how to describe HTML images</a>

A vague link provides less information:

<a href="/html5/tutorials/images/alt-text.html">Click here</a>

Descriptive anchor text helps visitors scan content, supports accessibility, and can give search engines additional context about the linked page.

Internal links are most useful when they connect information that is genuinely related. A visitor reading about creating HTML pages may benefit from links to optimizing images, optimizing, organizing, or publishing information.

<p>After creating pages, consistent optimizing images is important.
Read our <a href="/html5/tutorials/images/alt-text.html">image alt text guide</a>
for practical optimizing images tips.</p>

The link appears where the related topic is naturally mentioned, making it useful rather than forced.

Avoid adding unrelated links merely because another page needs more internal links. The relationship should make sense to the visitor.

Internal Links and Site Structure

Internal links help create the navigational structure of a website. Broad pages can link to more detailed pages, while detailed pages can link back to category pages and related topics.

Web Design
├── HTML Tutorials
│   ├── HTML Basics
│   ├── CSS Basics
│   └── JavaScript Basics
└── Responsive Images
    ├── Choosing Image Dimensions
    └── Image Accessibility

Links between these pages help visitors move through the structure instead of depending on search or the browser's Back button.

A logical structure also helps search engines understand which pages cover broad subjects and which pages provide more specific information.

Navigation menus provide consistent links to important sections of a website. They help visitors understand the site's major areas and move between them.

<nav aria-label="Main navigation">
  <ul>
    <li><a href="/">Home</a></li>
    <li><a href="/html5/tutorials/">Web Design</a></li>
    <li><a href="/tools/">Web Design Tools</a></li>
    <li><a href="/contact.html">Contact</a></li>
  </ul>
</nav>

Navigation should concentrate on useful destinations rather than attempting to link every page from every menu. Large websites usually benefit from organized navigation that leads visitors into logical sections.

Contextual links appear within the main content of a page and connect visitors directly to relevant supporting information.

<p>HTML pages are easier to navigate when related content is connected.
See our <a href="/html5/tutorials/images/alt-text.html">guide to writing image alt text</a>
for more information.</p>

These links can be especially useful because the surrounding text explains why the destination is relevant.

Use contextual links where they genuinely help the reader continue learning rather than inserting them mechanically into every paragraph.

Relative and Root-Relative URLs

Internal links do not always need the complete domain name. Relative and root-relative URLs can point to resources within the same website.

A root-relative internal link begins with a forward slash:

<a href="/html5/tutorials/introduction/what-is-html.html">HTML Basics</a>

The leading slash tells the browser to begin from the website's root directory. This can make links easier to maintain when pages are stored in different directories.

A document-relative URL is interpreted from the location of the current document:

<a href="html-basics.html">HTML Basics</a>

Either form can work. The important part is that the URL correctly identifies the intended resource and that the site's linking convention is used consistently.

An internal link should lead to a valid destination. Broken links create a poor experience for visitors and prevent search engines from following the intended path to the resource.

Broken links commonly appear after files are renamed, directories are reorganized, pages are deleted, or URLs are typed incorrectly.

<a href="/html5/tutorials/seo/image-seo.html">Image SEO</a>

If /html5/tutorials/image-seo.html is moved, update the internal link and use an appropriate redirect from the old URL when necessary.

Periodically checking internal links is especially useful on larger websites where pages and directories change over time.

More internal links are not automatically better. A page filled with unnecessary links can become difficult to read and can make the most useful navigation choices less obvious.

Links should have a purpose. They might help visitors reach the next part of a tutorial, learn more about a related subject, return to a category, or access a useful reference.

Avoid repeatedly linking every occurrence of the same word simply because a related page exists.

The goal is to create useful pathways through the website rather than maximizing the number of links on each page.

Common Internal Linking Miheadings

Mistake Better Approach
Vague link text such as click here Use wording that identifies or describes the destination.
Linking unrelated pages Connect content where the relationship is useful to visitors.
Broken internal links Update links when files or directories change.
Pages with no incoming internal links Connect important pages to appropriate navigation or related content.
Excessive repetitive links Add links where they provide a useful path to additional information.
Inconsistent URL styles Use a consistent internal linking convention throughout the website.

The following example shows a small page that uses navigation links and contextual links to connect related HTML tutorial content.

<nav aria-label="HTML topics">
  <ul>
    <li><a href="/html5/tutorials/introduction/what-is-html.html">HTML Basics</a></li>
    <li><a href="/html5/tutorials/css-getting-started/what-is-css.html">CSS Basics</a></li>
    <li><a href="/html5/tutorials/images/responsive-images.html">Responsive Images</a></li>
  </ul>
</nav>

<main>
  <h1>HTML Basics</h1>

  <p>HTML pages benefit from clear navigation and relevant internal links.</p>

  <h2>Optimizing Images</h2>
  <p>Write descriptive alt text for meaningful images. Learn more in our
  <a href="/html5/tutorials/images/alt-text.html">image alt text guide</a>.</p>

  <h2>Support</h2>
  <p>As your website develops, keep related pages easy to find. See
  <a href="/html5/tutorials/images/responsive-images.html">how to size images</a>.</p>
</main>
Play in Editor

Try changing the link text in the editor while leaving the destination unchanged. Compare vague wording with text that clearly explains what the linked page contains.

Best Practices

  • Connect important pages through useful internal links.
  • Use descriptive anchor text that helps identify the destination.
  • Link related content where the connection is useful to the visitor.
  • Use navigation to provide access to important website sections.
  • Add contextual links when they help readers continue learning about a topic.
  • Use a consistent internal URL convention.
  • Keep links working when files, directories, or page names change.
  • Redirect old URLs when content permanently moves to a new location.
  • Avoid excessive, repetitive, or unrelated links.
  • Make sure important pages are not isolated from the rest of the website.
  • Write internal links primarily to help visitors navigate useful content.