How to fix Links are not crawlable on Google Lighthouse

Viewed 1693

I got error while running google lighthouse. the warning is Link not crawable. this is the warning from google lighthouse.

<a href="https://www.mywebsite.com/en/test.html" id="multipleStore" target="popup" onclick="window.open('https://www.mywebsite.com/en/test.html','My popup windows open','resizable,height=480,width=875'); return false;">
                <p>click me</p>
            </a>
1 Answers

To prevent Google from crawling your link do not use a URL and use script instead.

If you use something like this Google Crawler (respectively Lighthouse) will ignore the link:

<a href="javascript:void(0)" onclick="openPopup()" class="link">click me</a>
<script>
function openPopup() {
    window.open('https://www.google.com/', 'Popup', 'width=400,height=875')
}
</script>

Example: https://codepen.io/headstarterz/pen/eYgMaew

Related