1

While looking over my google bot errors one of them was a 403 error from a directory link I never put anywhere. After searching around in that page for a bit I found that google followed a link it found in some javascript code, this code in particular:

    $.ajax({
        type: 'post',
        url: '/data/pages/' + r,
        success: function(data) {
            $('#mainbox').animate({"height": a}, 80, function() {

The google bot doesn't understand the + r part of it and keeps giving me errors about this. I know you can add a rel="nofollow" to anchors to tell googlebot not to follow them, but is there a way you can do this with script tags? (I searched around a lot and couldn't find a good answer)

4

2 回答 2

2

在您的robots.txt 中指定 google bot可以关注的链接

于 2013-03-26T10:24:19.643 回答
1

Matt Cutts 刚刚发布了一个关于这个主题的视频。在其中,他建议对 Javascript 文件使用 robots.txt。然而,他说:

事实证明,当我们执行 JavaScript 时,我们确实会查看属性。因此,您实际上可以使用 Javascript 并在各个 URL 上放置一个 nofollow 属性。

我不清楚将 nofollow 放入 javascript 的语法是什么。我在这里问过这个问题: https ://webmasters.stackexchange.com/q/46659/14543

于 2013-03-28T16:00:28.550 回答