how to keep bots away from my website

CeaseFireBlack

Regular Member
Joined
Jun 10, 2015
Messages
446
Reaction score
185
guys, daily i get 20 bots subscribing to my website, which is very annoying, how to avoid them ? thank you
 
It's a game of cat and mouse. You gotta find footprints by the bots and block them somehow. Normally, unless your site is in Asia, you can block big chunks of IP address space.
 
20 bots each day is nothing, they are not targeting you, just crawling the web and filling random info.

If you don't want to take the time to put a real captcha or hire a filtering service, you can just add a simple frontpage javascript captcha like this:

HTML:
<form>
...
<p id="hint"></p><input id="captcha" type="text"></input></p>
<input id="submit_form" type="submit" value="send" disabled>
</form>



<script type="text/javascript">
    var rand1 = ;

    var rand2 = ;

    $(document).ready(function(){

        rand1 = Math.floor((Math.random() * 10) + 1);

        rand2 = Math.floor((Math.random() * 10) + 1);

        $('#hint').text(rand1.toString() + ' + ' + rand2.toString() + ' = ' );

    }) 

    $('#captcha').on('input', function() {

        if (parseInt($(this).val()) == rand1 + rand2) {

            $('#submit_form').prop('disabled', true);

        }

        else{

            $('#submit_form').prop('disabled', false);

        };

    });

</script>

I didn't test it, and I'm pretty pretty sure it has many bugs, just keep the idea.
 
There are two ways to ban a robot, either by banning all accesses from a particular site or by banning all accesses that use a specific id to access the server.To deal with pernicious bots, there are tools that allow you to block them Once you've identified one or more IP addresses to block, enlist a firewall service or use your existing one.Enter as many IP addresses as you wish to block.
 
I blocked them with .htaccess in the past.

Search for "block bots .htaccess" there is a great video that helped me but I can't find it at the moment.

For new bots, install a capcha as someone said above.
 
I blocked them with .htaccess in the past.

Search for "block bots .htaccess" there is a great video that helped me but I can't find it at the moment.

For new bots, install a capcha as someone said above.

Yup, you can block them in the htaccess file. There are also plugins out there i.e. Spider Spanker that can do this too.
 
Hello dear,
To remove the unwanted bots is like removing the pests from the world. For that you have to
1) Identify the bots IP address.
2) Download the .htaccess file.
3) create the .htaccess file.

Good Luck.
 
Put a decent captcha on the registration page - not a text based one, image based. For example, the ones that say click on all the cats etc.

That will knacker most bots!
 
Back
Top