How to really hide a link

Imagine you want to add a link but you absolutely don’t want it can be followed by any robot.

Of course, you can add a nofollow attribute, but then It is up to robots to honor this request.

The best way to add a hidden link is using the HTML tag <span> instead of <a> and making it clickable through JavaScript.

If for example you want to hide the link:

<a href="">Sample link</a>


You can replace it with:

<span onclick="location.href='';">Sample Link</span>

Clicking on the “Sample link” the JavaScript code will still open the linked web page, but no robots will consider it as a link.


If you want to convert a link to a hidden link on your WordPress website, you can download the plugin Hide Link.

After activation, you need just to add #hide-this-link to the URL of the links that you want to hide.

If for example, you want to hide, just replace it with