- Issue created by @msn5158
- 🇪🇨Ecuador jwilson3
When you say domain name source, do you mean referrer?
If so, then Autoban supports creating a rule based on a specific "referrer" domain. But since Autoban module works by scanning watchdog log messages. The user would have had to have triggered some kind of watchdog message with a repeatable pattern (eg a 404 message, or something) for the referrer logic to even work.
It seems like what you're asking for would be better done by a different module, maybe a sub-module of Autoban, because it requires checking every single access request against a list of referrers.
This can also be done in an .htaccess file, which is maybe less desirable because you have to do a code release when you want to make a change, but on the other hand, its not requiring a Drupal bootstrap, database query to do the Referrer string comparison, and therefore requires less memory and resource impact. See https://www.drupal.org/node/243579 → for how to do this.
Finally, there is already a patch for Drupal core to handle referrer banning, but it was not accepted: #27787: Add Referrer Banning →