Links · Link targets
URL only in an onclick attribute
A destination on this page is only reachable through a JavaScript onclick, which search engines do not treat as a link.
How this page is built
The button below takes visitors to the link target page using JavaScript in its onclick attribute. There is no href, so search engines do not see it as a link.
Why it matters
Search engines only follow links that are a elements with an href. A destination that is reached through onclick or other JavaScript is invisible to crawlers, so it passes no equity and may not be discovered.
It also breaks expected behaviour for visitors, such as opening the page in a new tab or copying the address.
How to check it
Search the source for onclick attributes that contain location or href. Crawl tools that record JavaScript links can report them. Compare a crawl with JavaScript rendering turned off against one with it turned on.
How to fix it
Use a normal link with an href for anything that takes the visitor to another page. Keep buttons for actions that happen on the current page, such as opening a menu or submitting a form.