Skip to content

Commit 94339b8

Browse files
committed
Attempt to prevent bots indexing promos
- Mark the ads rel=nofollow - Add them to robots.txt - This was pretty much only a problem for Chinese spiders
1 parent 27d9ba3 commit 94339b8

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

media/robots.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
User-agent: *
22
Disallow: /builds/
3+
Disallow: /sustainability/click/

readthedocs/core/static-src/core/js/sponsorship.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Promo.prototype.place_promo = function (selector, promo_class) {
8181
.attr('class', 'rtd-pro-image-wrapper')
8282
.attr('href', self.link)
8383
.attr('target', '_blank')
84+
.attr('rel', 'nofollow')
8485
.on('click', self.click_handler);
8586
var promo_image = $('<img />')
8687
.attr('class', 'rtd-pro-image')
@@ -97,6 +98,7 @@ Promo.prototype.place_promo = function (selector, promo_class) {
9798
.attr('class', 'rtd-pro-link')
9899
.attr('href', self.link)
99100
.attr('target', '_blank')
101+
.attr('rel', 'nofollow')
100102
.on('click', self.click_handler);
101103
});
102104
promo.append(promo_text);

0 commit comments

Comments
 (0)