I would like to display my own ads on my website, so I'm writing plugin to do that. But I wonder how better handle links to not lose page rank. Ads inserted via javascript. Is it okay to have just <a href="" links or better to hide links in onclick="openLink()", or may be there are other options.

1 Answer 1


Simply mark them as nofollow. That way, the spiders know that you're not passing any of your SEO mojo to the destination. It's a simple attribute in the tag.

<a href="targeturlhere" rel="nofollow">

That being said, Google also have one specifically for links which are adverts.

<a href="targeturlhere" rel="sponsored">

Here's Google's own instructions on this. https://support.google.com/webmasters/answer/96569?hl=en

The link from that page goes to Google's explanation of its view of buying pagerank and how to avoid the appearance of this. So by using either nofollow or sponsored is not only beneficial to you, it's best practice too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.