1

I have some adverts on my site. This adverts are images and not closed in <a> tag. I store adverts URLs in JS array advertisement. When user clicks on advert the next JS code executed:

    $(".jLinkBlank").click(function() {
        var adverId = parseInt($(this).attr('id').substring(5));
        var url = advertisement[adverId];
        window.open(url, '_blank');
    });

But as I see Google indexing such URLs in any case. How can I prevent such URLs from Google indexation?

Solutions like robots.txt or <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> are not acceptable, because URLs list is dynamic and I have other URLs on the pages what must be indexed by Google.

Dmytro Zarezenko
  • 10,526
  • 11
  • 62
  • 104
  • Could you check if these URLs are not available anywhere else? The reason the Google bot has indexed them might be different. – Haralan Dobrev Mar 27 '13 at 13:01

1 Answers1

1

You can try to encode your uri in base64 and decode them when adding them to page :

You can use btoa to decode a base 64 string, atob to encode.

$(".jLinkBlank").click(function() {
     var adverId = parseInt($(this).attr('id').substring(5));
    var url = btoa(advertisement[adverId];)
    window.open(url, '_blank');
});
Pierre
  • 1,274
  • 1
  • 9
  • 14