How to set up a content locker with captcha but exclude search bots?

85 Views Asked by At

I want to set up a content locker to prevent users from scraping my website but still allow search engine bots to see the full content, somehow exclude the code from being applied to bots, only to visitors.

The content locker doesn't really need to be very advanced, it can be a simple captcha challenge or even just a simple button like this one:

<script type="text/javascript">
function showDiv() {
   document.getElementById('welcomeDiv').style.display = "block";
}
</script>

<div id="welcomeDiv"  style="display:none;" class="answer_list" > WELCOME</div>
<input type="button" name="answer" value="Show Div" onclick="showDiv()" />

Can anyone help me out please?

0

There are 0 best solutions below