How to Get Google Sitelinks with a Table of Contents

· 6 min read

If you've ever searched on Google and seen a result with additional links below the main listing — smaller links that jump to specific sections of the page — you've seen sitelinks. These in-page sitelinks (sometimes called "jump-to" links or anchor links in search results) make your listing larger, more informative, and significantly more clickable. And one of the most reliable ways to earn them is by adding a table of contents to your long-form content.

In this article, we'll explain what sitelinks are, how Google decides when to show them, how a table of contents creates the structure Google needs, and how to implement one on your WordPress site for maximum impact.

What Are Google Sitelinks?

Google displays several types of sitelinks. The most common are the site-wide sitelinks that appear under a brand's homepage listing — links to pages like "About," "Contact," and "Products." These are generated automatically for established sites and are not what we're discussing here.

The type we're focused on are in-page sitelinks (also known as "one-line sitelinks" or "anchor link sitelinks"). These appear below individual page listings in search results and link to specific sections within that page. They look like small text links such as "Installation," "Configuration," or "Troubleshooting" directly under your search snippet.

These in-page sitelinks serve a clear purpose for Google: they help searchers navigate directly to the information they need without scanning through an entire long-form article. For the publisher, they make search listings take up more visual real estate and provide additional entry points that match various search intents.

How Google Generates In-Page Sitelinks

Google's documentation is characteristically vague about the exact criteria for showing sitelinks. What we know from official statements and extensive testing by the SEO community is:

  • Anchor links are required. Google needs clickable anchor links that point to specific sections of the page. Without them, there's nothing to display as a sitelink.
  • Clear heading structure matters. The sections pointed to by anchor links should have descriptive headings that match potential search queries. A heading like "Step 3: Configure the Plugin" is more likely to become a sitelink than "Part Three."
  • Page relevance and authority. Google is more likely to show sitelinks for pages that already rank well for competitive queries. If your page is on page three of results, sitelinks won't appear regardless of your HTML structure.
  • Query match. Sitelinks appear when Google determines that showing specific sections would be more useful for the searcher's query than just the main page. They're more common for informational and how-to queries than for transactional ones.

You cannot directly request or force Google to display sitelinks. But you can create the conditions that make them most likely to appear. This is where a table of contents comes in.

How a Table of Contents Creates Sitelink Opportunities

A table of contents is essentially a list of anchor links at the top of your page, each pointing to a specific section heading. This is exactly the HTML structure Google needs to generate in-page sitelinks.

Anchor Links for Every Section

A well-implemented TOC creates anchor links (using HTML id attributes) for each heading in your content. When Google crawls the page, it discovers these anchors and can use them as entry points in search results. Without a TOC, your headings might not have id attributes at all, making it impossible for Google to link to specific sections.

Descriptive Link Text

The text in your table of contents mirrors your heading text, which should be descriptive and keyword-relevant. Google uses this text (and the heading it points to) to determine what each section covers and whether it matches a searcher's intent. A TOC with entries like "How to Install the Plugin," "Configuration Options," and "Troubleshooting Common Errors" provides clear, actionable labels that Google can display as sitelinks.

Visible Navigation

Google prefers to show sitelinks for pages that have visible, user-facing navigation. A table of contents at the top of the page signals to Google that the page is well-structured and that the anchor links are intended for navigation, not just incidental HTML. This is why a rendered TOC tends to generate sitelinks more reliably than simply adding id attributes to headings without any visible navigation.

Setting Up Tidy Table of Contents

Tidy Table of Contents is a WordPress plugin designed to generate tables of contents automatically from your heading structure. It handles all the technical requirements for sitelink eligibility.

Installation and Activation

Install from Plugins → Add New, search for "Tidy Table of Contents," install, and activate. The plugin works immediately with default settings — no configuration required to get started.

Automatic Heading Detection

Tidy Table of Contents scans your post content for heading elements (H2, H3, H4) and builds the TOC automatically. You don't need to manually add anchor IDs or modify your content. The plugin generates clean, URL-friendly IDs for each heading and renders a clickable navigation list.

Display Options

You control where the TOC appears: before the first heading (the most common position), after a specific paragraph, or via a Gutenberg block that you place manually. You can also set the minimum number of headings required before a TOC is shown — typically three or four — so short posts don't get unnecessary navigation.

Smooth Scrolling and Accessibility

The plugin implements smooth scrolling for anchor clicks, so visitors aren't jarred by an instant jump to a different section. It also uses proper ARIA attributes for accessibility, ensuring screen readers can navigate the TOC effectively.

Heading Best Practices for Sitelinks

Your table of contents is only as good as your heading structure. Follow these guidelines to maximize sitelink potential:

Use Descriptive, Keyword-Rich Headings

Each heading should describe its section content in clear, specific terms. "How to Install the Plugin on WordPress" is better than "Installation." "Common 404 Error Causes and Fixes" is better than "Problems." Think about what someone might search for and use that language in your headings.

Maintain a Logical Hierarchy

Use H2 for main sections and H3 for subsections within those sections. Don't skip levels (e.g., going from H2 to H4). A consistent hierarchy helps Google understand the relationship between sections and is more likely to generate properly structured sitelinks.

Keep Headings Concise

Sitelinks have limited display space in search results. Headings that are 5-10 words tend to display fully, while longer headings get truncated. Google may also choose not to show a sitelink if the heading is too long or unclear. Aim for headings that work as both on-page navigation labels and search result links.

Front-Load Important Words

Put the most important and descriptive words at the beginning of each heading. "WordPress Plugin Installation Guide" is better than "A Complete Guide to Installing WordPress Plugins" because the key information ("WordPress Plugin Installation") appears first and won't be truncated.

Avoid Duplicate Headings

If multiple sections have similar headings, Google may not be able to differentiate them for sitelink purposes. Each heading should be unique and distinguishable. Instead of having three sections all titled "Best Practices," use "Security Best Practices," "Performance Best Practices," and "Content Best Practices."

Measuring Sitelink Impact

After implementing a table of contents, monitor Google Search Console's Performance report for the affected pages. Look for:

  • Increased click-through rate (CTR). Pages with sitelinks typically see higher CTR because the listing is more prominent and provides multiple entry points.
  • Increased impressions. Google sometimes shows sitelinks for queries that the page wouldn't have appeared for without them, expanding your visibility for long-tail variations.
  • Fragment URLs in search queries. In Search Console, you may see URLs with #anchor fragments appearing in your performance data, indicating that Google is showing and users are clicking sitelinks.

Sitelinks don't appear immediately after adding a TOC. Google needs to recrawl the page, process the changes, and determine that sitelinks would be useful for relevant queries. This typically takes a few weeks to a couple of months.

Learn more about Tidy Table of Contents →

Frequently Asked Questions

Can I control which sections appear as Google sitelinks?

Not directly. Google decides which sections to display as sitelinks based on the search query and what it determines is most useful for the searcher. However, you can influence the outcome by using clear, descriptive headings that match search intent, maintaining a clean heading hierarchy, and ensuring your table of contents generates proper anchor links. Sections with vague or overly generic headings are less likely to be selected.

Do I need a table of contents on every post?

Not necessarily. A TOC is most valuable on long-form content with multiple distinct sections — typically posts with 1,500 or more words and at least three H2 headings. Short posts (under 800 words) or posts with a simple linear structure don't need a TOC. Tidy Table of Contents lets you set a minimum heading count threshold, so it only appears on posts that actually benefit from navigation.

Does a table of contents directly improve rankings?

A table of contents doesn't directly boost rankings in the algorithmic sense. Google doesn't give a ranking bonus for having one. However, the indirect benefits are significant: better user experience (lower bounce rate, longer time on page), sitelinks that increase CTR from search results, and improved crawlability through clear anchor link structure. These factors can contribute to ranking improvements over time, especially for long-form content competing in informational queries.