Home›Java›Mods›HostnameEnforcer
# Block Connections

This is a minecraft plugin that's utilized to stop bot scanning activity. Sometimes these bots will post servers to grief or otherwise inform unwanted visitors. The solution to a lot of these problems is to have explicit allowed hostnames that must be used to connect. This plugin is designed such that you can configure one or more allowed hostnames, and anything else will be blocked with a custom block message sent to their client.

```
# Block Connection Config

version: 1 # DO NOT CHANGE. Used to track for future changes.
enabled: true # Enables or disabled the plugin.

# These are configured hostnames, can add or remove by adding additional lines
hostname:
- mc.example.com
- mc2.example.com
- mc3.example.com
port: 25565 # Port that your server listens on
kick-message: Unauthorized # Custom kick message

# Enables logging of blocked ping events (Default: true)
enable-logging: true
```

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

HostnameEnforcer is a free Minecraft Java mod. Compatible with Minecraft 1.21. Downloaded 76 times (via Spigot). Download it and open it directly in the game.

Explore more