HostNameWhiteList 1.4

[Bungee or Bukkit] Redirect users who try to connect to your server using an unofficial domain

  1. EDawg878
    As of 1.4, this is a universal plugin meaning you can use it with either BungeeCord or Bukkit.
    To put it simply, you can place the jar in the BungeeCord plugins folder or the Bukkit plugins folder.


    This plugin creates a whitelist of host names that can connect to your servers. This plugin is useful to block other domains (i.e. unofficial domains that you don't have ownership of) that are linking to your server while also providing a helpful message to the end user that redirects them to the official address. This plugin may also be useful if you have changed your server IP and want to redirect your users to a new one.

    Source Code

    Aliases: hostnamewhitelist, hnw

    /hnw reload
    - Reloads configuration
    - permission: hostnamewhitelist.admin

    Code (Text):
    # Message that is displayed on the MOTD or when a player tries to connect
    warning: '&cYou entered the wrong IP address, please use & &c instead'
    # Block legacy players since we can't check which hostname they are connecting from
    block-legacy: true
    # Ignore hostname capitalization
    ignore-case: true
    # Players can only connect through the following host names
        - 'localhost'
    alekitopi, RobinMC, agusztin and 4 others like this.

Recent Updates

  1. Release 1.4
  2. HostNameWhiteList 1.3
  3. HostNameWhiteList v1.2

Recent Reviews

  1. Rickebo
    Version: 1.4
    Works as intended, although diagnostics such as debug outputs would be a nice addition. If anyone is interested in this, check out my fork of this repo.

    Beware of that if you are using a SRV record pointed to a CNAME (or just a CNAME), you should add the last A name record to "allowed-host-names", not a CNAME record.

    Example: = CNAME pointing to = CNAME pointing to = A pointing to

    If players connect to, you should add to allowed-host-names. If another player creates a CNAME pointing to your address, players could still join with their domain. Example of this: = CNAME pointing to

    Joining will probably still work even if you use this plugin.
  2. RXXA7
    Version: 1.4
    Does not work for me
    - Paper 1.12.2
    - ServerList+
    Does not work with and even not with localhost & default config
  3. Luky584
    Version: 1.4
    Super easy and awesome plugin!
    Works as expected.

    Newline support would be great.
  4. Froad
    Version: 1.4
    Good plugin. Please add ignorecase. People type domain name with CAPS and it does no work.
    Version: 1.4
    If you add per player subdomain option it will be fantastic plugin! Gooooood plugin!
  6. HaynoGames
    Version: 1.4
    I really needed this plugin and it is just what I was looking for, however, you add the config option to disable the MOTD message as I have my MOTD message already saying the new IP.
  7. itismejoey
    Version: 1.4
    Awesome plugin!! Could I request a feature to add a new line (\n)?
  8. Tsetsi
    Version: 1.4
    Hey man why i cant edit messages ? this is bad
    1. EDawg878
      Author's Response
      I'm assuming you are talking about the Bukkit version?
  9. teledong
    Version: 1.4
    I Think Bukkit version is broken.
    PlayerLoginEvent.getHostName() Function is showing player's client IP address, so anybody can't connect server.
    1. EDawg878
      Author's Response
      Yes, the Bukkit version is currently broken. Although I'm was pretty sure only the MOTD part was broken.
  10. Emerald_Craft
    Version: 1.2
    Very good if you need to change your domain!!!
    1. EDawg878
      Author's Response
      Good point, never thought of that. I'll add it to the description