Skip to content

A WordPress plugin that detects the browser and checks whether it is up to date. Blocks old versions and suspicious browsers. It provides a robots.txt file to prohibit crawling and blocks crawlers if they do so anyway.

License

Notifications You must be signed in to change notification settings

hupe13/wimb-and-block

Repository files navigation

Block old browser versions and suspicious browsers

Contributors: hupe13
Tags: bad bots, ban, blocking, security, monitor
Tested up to: 6.9
Stable tag: 251111
Requires at least: 6.5
Requires PHP: 8.3
License: GPLv2 or later

With help of WhatIsMyBrowser the plugin detects old and suspicious agents and denies them access. A special robots.txt prevents crawling by bad bots.

Description

The plugin uses WhatIsMyBrowser.com to get informations about the browser. It detects old and suspicious browsers and denies them access to your website. It provides a robots.txt file to prohibit crawling and blocks crawlers if they do so anyway.

  • Get an API key from What is my browser? for a Basic Application Plan.
  • You have a limit of 5000 hits / month for Parsing User Agent. Thats why the plugin manages a database table.
  • The user agent string of every browser accessing your website the first time is send to this service and some data will be stored in this table:

    header example entries

    Browsers will be blocked, if the browser and/or the system is an old one:
    Default: Chrome and Chrome based browsers < 128, Firefox < 128, Internet Explorer, Netscape (!), Opera < 83, Safari < 17
    Old systems are all Windows versions before Windows 10, some MacOS and Android versions.

    example entries

    It will be blocked also if the "simple software string" contains "unknown" or is empty.

    example entries

  • You can configure other browsers too.
  • Sometimes there are false positive, for example if the browser is from Mastodon. Then you can exclude these from checking.
  • The plugin checks, if the crawlers are really from Google, Bing, Yandex, Apple, Mojeek, Baidu, Seznam.

About robots.txt

  • You can configure some rewrite rules, to provide a robots.txt to enable or to disable crawling for a browser. If crawling is disabled, access to your website will be blocked for that browser.

Logging

  • The logging can be very verbose. Please check the logs and the WIMB table regularly.

Updates

Please install ghu-update-puc to get updates and keep an eye on this repository in case I've made any mistakes.

About

A WordPress plugin that detects the browser and checks whether it is up to date. Blocks old versions and suspicious browsers. It provides a robots.txt file to prohibit crawling and blocks crawlers if they do so anyway.

Topics

Resources

License

Stars

Watchers

Forks

Languages