Skip to content

Link best practices

Short answer

Google can generally only crawl links that are anchor elements with an href; JavaScript-only links may not be followed. Anchor text should be descriptive, concise and relevant. Every page you care about should be linked from at least one other page on your site, and there is no ideal number of links per page.

<!-- Crawlable -->
<a href="/robots-txt/">robots.txt reference</a>
<!-- Not reliably crawlable -->
<span onclick="go('/robots-txt/')">robots.txt reference</span>
<a href="javascript:goTo('robots')">robots.txt reference</a>

Every link between entries is a plain <a href> in the server-rendered HTML, with the target entry’s title as anchor text. Every entry is linked from its topic hub, its topic’s sidebar and the A–Z index. Most are also linked from related entries, so no published page is an orphan.

Sources