Trakis

Trakis · Rules

Internal links without a valid href

Links whose href is empty, cannot be read as an address, or navigates in javascript:. A javascript:void(0) or a bare # goes nowhere: an action dressed as a link, left alone. Google follows an <a> whose href is a real address; a javascript: href it lists as not recommended. If such links are the only way to a page, that page may not be found.

WarningLINK-003 · Links · checked on every page

javascript:void(0) and links crawlers cannot follow

Updated 17 October 2026.

javascript:void(0) is what a link’s address says when it is not really a link: a menu toggle, a “show more”, a button wearing a link’s clothes. It goes nowhere on purpose. The trouble starts when a script in the address is the only way to a real page. This check finds that, and empty or unreadable addresses.

What Google says (its page on crawlable links):

  • It can only reliably crawl a link that is an <a> element with an href that resolves to a real address. A script on the link is fine, as long as the href is that address.
  • Not recommended, though Google may still try: href="javascript:goTo('products')", href="javascript:window.location.href='/products'", and links with no href at all, only an onclick.
  • Links a script adds to the page later are crawlable too, as long as they are written that way.
<!-- crawlable: the address is in the href, the script can still run -->
<a href="/boots" onclick="track('boots')">Boots</a>

<!-- not recommended: the address only exists inside the script -->
<a href="javascript:goTo('boots')">Boots</a>

And javascript:void(0)? It is not a broken link, it is a missing button:

  • For an action, a menu, a tab, a “load more”, use a <button type="button">: keyboards and screen readers treat it as a button, and nobody expects it to lead anywhere.
  • For navigation, put the address in the href, and let the script add to it rather than replace it.
  • A “load more” that fetches the next items can still be a link to the next page, /boots?page=2, which the script follows for people and crawlers follow as it is.

Ours, as it is. trakis.io’s robots.txt validator has four actions, Check the file, Try an example, Rewrite my file and Copy, and each is a <button>. Its one href="#" sits in a hidden row the script copies and fills with an operator’s documentation address; it is never a link anyone sees with a # in it. The other public pages have no javascript: links at all.

Check it yourself. Hover a link and read the address in the browser’s status bar. Or search the page source for href="javascript:; if the text after it names a page, a crawler may never get there.

How the audit decides.

  • It reads every link on the page as written. A javascript: href that navigates (sets the location, opens a window, calls a goTo, names a path) counts, and so does an empty href or one that cannot be read as an address.
  • javascript:void(0), javascript:;, a bare #, in-page anchors, mailto: and tel: are left alone.
  • Any is LINK-003, a warning, with the first three as evidence; pages from one template are one finding. Until 17 October 2026 every javascript: href was left alone, though this check’s own text said otherwise.
  • It reads only <a href>: an <a> with only an onclick, or a <span> made clickable, is not seen. A link to a page that answers an error is LINK-004.

Sources, read on 17 October 2026: Google Search Central, Link best practices for Google.

How common it is

In our study of 330 small sites, read from Common Crawl’s October 2026 archive (up to 100 pages a site), 32.7% of them had this problem on one page or more.

Where it usually comes from

Menus built with a script in the href (javascript:goTo(...)), links whose address a script fills in later, or an empty href left by a template.

How to fix it

  • Give every navigation link a real address in its href.
  • Keep javascript: and # for actions that are not navigation, such as opening a menu — and use a <button> for those.
  • If a script fills the address in later, have the server print it in the HTML from the start.

How to check it yourself

Hover the link and look at the address in the browser's status bar: a javascript: address that leads to a page means crawlers may not follow it.

What it looks like in a report

Warning 9 links have no address a crawler can follow: empty, unreadable, or a script in the href. · evidence: "javascript:goTo('boots')"

The category menu navigates with a script in each link; crawlers cannot follow it to the categories. (An example shop; the numbers are illustrative.)

How the audit counts it

LINK-003 is a warning in the links category, and weighs lightly in that category’s score. When it appears on many pages built from the same template, the report shows it once, with the number of pages it covers — because one change in the template fixes all of them.

If the finding is deliberate on your site, it can be accepted as intentional in the report. It then leaves the list and the score, and comes back on its own if what it shows changes.

Other links checks

Find it on your site

A free Trakis audit runs this check and the other 66 on your site, and tells you on how many pages each one sits. Or go back to all the rules.