r/AskProgramming • u/Adventurous-Hunter98 • Oct 23 '26
What would be your implementation for preventing bot accounts?
Lets say you created a new social media/forum/user based site and you want to prevent bots as much as you can, what would be your implementation do this while maintaining users privacy? not like current id verification they are trying to implement
3
Upvotes
4
u/portar1985 Oct 23 '26
I've always dreamed of creating a social media platform which actually uses national ID systems, so an account always can be attributed to a human being. The issue obviously being that there must exist a digital id (like bankID in sweden which can function in a "ok, you're a human, come in" kind of way) and the code would need to be open source to be able to show that we really do not use your credentials, just the auth part.
3
u/forestking101 Oct 23 '26
Honeypot fields inside hidden forms work surprisingly well
2
u/KingofGamesYami Oct 23 '26
What is a "bot account"? Is it accounts created by bots? Accounts created by humans for bots? Formerly human accounts stolen by bots?
2
u/OptimistIndya Oct 23 '26
Ask random history/ science/recepie questions science questions
Upload a relevant picture of - questions
About 3-5 questions. Random and update the question format from academic papers and other sources
6
u/xRmg Oct 23 '26
Its always a tradeoff between useability, privacy and price to bypass
Captcha's are easy to implement but easy to bypass, a dollar gets you 1000 solves with a bypass service.
Then there is browser fingerprinting, whitelist for email domains, geolocation of user, vpn blocking, which all make it a little harder to bypass.
Phone number verification, bypass services start at 10 cents per message depending on country and platform, if you ban cheap voip numbers, and have a select list of countries/providers that are withlisted, bypass price goes up to 3 dollars and more.
ID verification is about 10 to 30 dollars based on package.
So how bad do you want to prevent bots, Personally id consider phone number verification, and a whitelist for email adresses, vpn block/ip bans, and a captcha.
5
u/JacobStyle Oct 23 '26
Well, since it would be a new site, created by me with my shit marketing skills, it would remain obscure enough never to be botted.
But for a more technical answer, any anti-bot, anti-cheat, anti-hack measure in any big platform, there is no single solution. There are fundamentals (requiring email verification to make an account, banning for rapid posting, basic account security) that any platform will implement from the start. Anything you implement will get circumvented eventually though.
This requires continual effort, detecting when botters have found ways around your countermeasures and then implementing new security. Any solution aggressive enough to have an impact will also negatively impact user experience when first implemented and will require fine tuning. Sometimes compromises will have to be made, allowing some bot posts in order to avoid too many false positives.
Bot traffic also comes and goes for a lot of platforms, depending on factors like controversies related to the community making the news. During a time that is particularly bad, you may need to implement temporary measures that are more strict that normal, such as freezing of account creation or having stricter posting limits.
1
u/gnufan Oct 23 '26
I'd say from work on websites for other things a useful approach is not to reveal how you decide someone is dodgy to in a testable way.
We spent ages creating protections on the sign-up forms, what worked best for one abuser was deleting everyone who registered accounts where the country code was not on the drop-down on the picker, but we disabled those accounts the same time each day rather rejecting them at the sign-up form processing.
We put days of work into a fancy control in the login page, and I actually found the session when that abuser first figured out what the changed, and shortly afterwards the bots started up again with a workaround. Whereas because we deleted the dodgy country accounts in asynchronous manner, they couldn't easily figure out what we were using as the identifier.
Also consider linking accounts to mobile phone numbers not emails, think account sign up and recovery flow. As it is still slightly more effort to get another number in general, than another email address.
1
u/ericbythebay Oct 23 '26
Easiest way is to charge for the accounts.
3
u/mredding Oct 23 '26
Credit card number. If you don't mind getting regionally specific - some sort of government identifier coupled with some sort of authentication.
Of course, no one will want to do this, and you can't be trusted with such sensitive information.
1
u/BoBoBearDev Oct 23 '26
Two form authentication. Send the activation code via phone number. If they don't type the activation key, that means they are using someone else's phone number.
2
u/Last8Exile Oct 23 '26
Today even real people behave like bots. They use AI to write their posts and respond to comments.
1
u/nwbrown Oct 24 '26
Require something like a school or corporate email and only allow on organizations which agree to only allow human users on.
1
u/Rscc10 Oct 23 '26
Probably the click patterns? Or if something like reddit, scroll patterns/speed? I'm not even qualified to be answering a question this technical but those are what come to mind
0
u/OkOcelot6725 Oct 23 '26
Don't try to win at signup, win at the action level. Bots are economical because one account can act thousands of times, so throttle the expensive actions (posts, DMs, votes) by account age and reputation. A bot farm that needs a week of normal behavior per account before it can spam stops being profitable, and no ID check needed.
2
u/[deleted] Oct 23 '26
[removed] — view removed comment
0
u/[deleted] Oct 23 '26
[removed] — view removed comment