Learn · Technical SEO · Beginner

How to check your links are crawlable by Google

Learn how to tell whether the links on your pages are written in a way Google can follow, and how to check in Search Console what Google actually received.

By Dean Cruddace · 30 minutes to do · Updated · Last reviewed

What a crawlable link is

A link looks the same to a visitor however it is built. To a crawler it is not the same. Google says that, generally, it can only crawl a link if it is an <a> element (an anchor) with an href attribute, the part that holds the destination address.

A button or box that sends people somewhere using a script, with no real address written in the page, may work perfectly in a browser yet give Google nothing it can reliably follow. This guide shows you how to check your own pages.

Why Google needs links it can follow

If a link is not crawlable, the page it points to may not be discovered through your site. Google says it cannot reliably extract URLs from anchors without an href, or from other tags that act as links because of script events. Nothing looks broken to the people using the site, so the fault is easy to miss. See Google's link best practices.

What you need to check your links are crawlable by Google

  • A web browser with a View page source option
  • Access to Google Search Console for the site, for the inspection step
  • Three to five pages that matter, such as a category page, a page with a menu and a page with pagination or related links

Check your links are crawlable by Google, step by step

  1. 1

    Pick the links to test

    Choose the links that matter most for finding other pages: the main menu, links to products or articles on a listing page, pagination (next and previous), and related-page links. Write down one example of each, with the address it should lead to.

    You will know it worked when You have a short list pairing each link with its expected destination.

  2. 2

    Look at the link in the raw page source

    Open the page, right-click and choose View page source (not Inspect). Search with Ctrl+F for part of the link text. Google lists links it can parse, such as <a href="https://example.com"> and <a href="/products/category/shoes">. It also accepts an anchor with both an href and an onclick handler, because the href carries the destination. Note whether each of your links is written like this.

    You will know it worked when For each link you can say: found in the source as an anchor with an href, or not found.

  3. 3

    Spot the formats Google does not recommend

    Google says it does not recommend, though it may still try to parse, these formats: an anchor with a framework attribute such as routerLink and no href, a span with an href, an anchor with only an onclick, and an href that contains a javascript: call instead of an address. The address in the href should be one a crawler can send a request to, such as /products.

    You will know it worked when Every link is sorted as a recommended format or a not-recommended one.

  4. 4

    Check what Google saw, using URL Inspection

    Google says links added by JavaScript are fine if they use the anchor and href markup. To check, paste the page address into the inspection bar in Search Console, choose Test live URL, then View tested page to see the HTML returned, response headers and JavaScript console output. Google says the extra response data is only available for URLs that are on Google, and live tests have a daily limit per property. If JavaScript inserts your link text, Google says to use URL Inspection to confirm it is in the rendered HTML. See the URL Inspection help.

    You will know it worked when You can see the page's HTML as Google received it and find your test links in it, or confirm they are missing.

  5. 5

    Understand why a script-only link is risky

    Google describes the order. Googlebot fetches the page and reads the HTML for links in href attributes. Pages with a 200 status are then queued for rendering, which can take longer than a few seconds. A headless Chromium then runs the JavaScript, and Googlebot reads the rendered HTML for links again. So a link in the server's HTML can be read at the first stage, while one that exists only after scripts run depends on rendering working. Google will not render JavaScript from blocked files or pages. See JavaScript SEO basics.

    You will know it worked when For each link that is missing from the raw source but present in the rendered HTML, you have noted it as depending on rendering.

  6. 6

    Fix the links and test again

    Ask your developer, or change your template or plugin settings, so each link is a real anchor with an address in its href, keeping any script behaviour as an addition. With client-side routing, Google says to use the History API, not URL fragments such as #/products. Then repeat the live test. Google also says its rendering service clears local storage, session storage and cookies across page loads and declines permission requests, so do not make links depend on them. See Fix search-related JavaScript problems.

    You will know it worked when In the new live test, each link appears as an anchor with an href in the HTML Google received.

Common mistakes when you check your links are crawlable by Google

  • Judging links by how they look and click in the browser. Google reads the markup, not the appearance.
  • Relying on javascript: addresses or click handlers as the only destination. Google does not recommend them.
  • Using # fragments to load different pages. Google says not to rely on them.
  • Showing links only after a login, a stored preference or a permission prompt, since Google says the rendering service does not keep state or grant permissions.

Terms used when you check your links are crawlable by Google

Anchor element
The HTML tag, written <a>, that makes a link.
href
The attribute on an anchor that holds the address it leads to.
Raw HTML
The page code exactly as the server sends it, before any scripts run.
Rendered HTML
The page code after a browser-like process has run the JavaScript.
History API
A browser feature that lets a script change the page address to a proper path instead of a # fragment.
Navigation built with scripts and not sure Google can follow it?

Send Dean a page address and what View page source shows for your main links. Rendering and architecture are covered by the technical SEO work.

Talk to an SEO specialistTechnical SEO: rendering →