开发者

How to make an javascript row link nofollow?

开发者 https://www.devze.com 2023-02-26 22:01 出处:网络
How do I make my javascript row link a nofollow link? <tr class=\"thumbnail-item\" onclick=\"window.open(\'<%= vind.tracking %>\')\" 开发者_StackOverflow中文版>

How do I make my javascript row link a nofollow link?

<tr class="thumbnail-item" onclick="window.open('<%= vind.tracking %>')" 开发者_StackOverflow中文版>


You can't, but since search engines ignore JavaScript, that really doesn't matter.


You can have the url go trough a redirector that is blocked in robots.txt.

If you want to link to google.com then you'll open yoursite.com/blocked.php?url=google.com, and have the url yoursite.com/blocked.php blocked in robots.txt. blocked.php will then redirect to the specified url parameter, but will be blocked for crawlers. F.ex:

User-agent: *
Disallow: /blocked.php

Source

0

精彩评论

暂无评论...
验证码 换一张
取 消