I wanted to know that How to block unknown browsers in .htaccess? There is a Directive that can be used in .htaccess called BrowserMatchNoCase but I do not know how to work with it.

  • 4
    what do you mean unknown browsers?
    – masegaloeh
    May 16, 2014 at 18:50
  • Robot , spam softwares , hackers made browsers to do some action May 16, 2014 at 18:53
  • This won't actually help you. The User-Agent header can be whatever the client wants to identify itself as. You're far more likely to punish innocent programs that are being truthful, because there's nothing to stop a malicious program from identifying itself as a popular web browser.
    – Andrew B
    May 16, 2014 at 19:44

1 Answer 1


You could create a whitelist.

However, this is a pointless endevour. While a lot of scripts and scanners, etc... will sometimes have a fake or custom created UA (user-agent), lots of the scripts these days will just mimic known UA strings, which renders just about every possible blacklist or whitelist approach pointless.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .