2

My website allows users to post content with links. There is one page which displays these posts with each post wrapped in <a></a> tags

To avoid nested links issue, the links posted by user in the content, will be converted to <span onclick="window.href.location=">link</span> so that when the entire content is wrapped in <a></a> tags, there is no nesting.

Some websites claim that search engines do follow these javascript links. So, how to mention rel="nofollow" in links like <span onclick="window.href.location=">link</span>

AVC
  • 67
  • 9
  • Possible duplicate of [window.open() add a rel="nofollow" attribute](https://stackoverflow.com/questions/26784635/window-open-add-a-rel-nofollow-attribute) (You're not using `window.open()` but the answer will be the same: you can't. You'll need to remove the ` wrapping the whole post, instead.) – Daniel Beck Oct 31 '17 at 20:13

0 Answers0