In short
Google follows links only when they're <a> elements with a real URL in href. PageSpeed flags anchors like <a href="javascript:void(0)">, <a> with no href, or links that navigate only through onclick. If the element is a real link, give it a real URL. If it's an action (open menu, play video), use a <button> instead.
In passed form: "Links are crawlable."
| Not crawlable | Crawlable |
|---|---|
<a href="javascript:void(0)" onclick="go('/services')"> |
<a href="/services/"> |
<span onclick="location='/about'"> |
<a href="/about/"> |
<a> used as a menu toggle |
<button aria-expanded="false"> |
This guide isn't affiliated with or endorsed by Google.
Related issues
Sources and references
Google Search Central, Link best practices for Google

About the author
Nazmul Nikhil
Head of SEO & Assistant Manager, Digital Marketing at Notionhive
SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.



