JavaScript rendering · JavaScript content and links

Links built from non-anchor elements

The two navigation buttons on this page go to other pages through click handlers. They have no href, so search engines cannot follow them.

How this page is built

The buttons below each hold a destination in a data-href attribute. A script sends the browser there when one is pressed. Both destinations are linked normally elsewhere on the site.

Why it matters

Google only follows <a> elements with an href. Buttons, spans and divs with click handlers do not count as links, even after rendering, because Google does not click anything. Pages reached only this way are not discovered through them, and they pass no link signals.

Visitors also lose features they expect from links, such as opening in a new tab, copying the address or seeing where the link goes.

How to check it

Look for elements with onclick handlers, data-href attributes or role="link" that are not anchors. Crawl tools show fewer outlinks than you see on the page. In the browser, right-click a navigation item: if there is no option to open it in a new tab, it is not a link.

How to fix it

Use <a href> for anything that takes visitors to another page, and keep buttons for actions that happen on the same page.

Back to all tests