Skip to content

Commit

Permalink
Attempt to prevent bots indexing promos
Browse files Browse the repository at this point in the history
- Mark the ads rel=nofollow
- Add them to robots.txt
- This was pretty much only a problem for Chinese spiders
  • Loading branch information
davidfischer committed Mar 2, 2018
1 parent 27d9ba3 commit 94339b8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions media/robots.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
User-agent: *
Disallow: /builds/
Disallow: /sustainability/click/
2 changes: 2 additions & 0 deletions readthedocs/core/static-src/core/js/sponsorship.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Promo.prototype.place_promo = function (selector, promo_class) {
.attr('class', 'rtd-pro-image-wrapper')
.attr('href', self.link)
.attr('target', '_blank')
.attr('rel', 'nofollow')
.on('click', self.click_handler);
var promo_image = $('<img />')
.attr('class', 'rtd-pro-image')
Expand All @@ -97,6 +98,7 @@ Promo.prototype.place_promo = function (selector, promo_class) {
.attr('class', 'rtd-pro-link')
.attr('href', self.link)
.attr('target', '_blank')
.attr('rel', 'nofollow')
.on('click', self.click_handler);
});
promo.append(promo_text);
Expand Down
Loading

0 comments on commit 94339b8

Please sign in to comment.