News
Game
Guides
Downloads
Versions
/ban-ip
COMMANDS SERVER ADMIN SERVER · LEVEL 3 Added in 1.14 or earlier

/ban-ip command in Minecraft

/ban-ip blocks every connection from one IP address, whatever the account. You can type the address or the name of an online player to ban the IP they are using. It runs on dedicated servers, from the console or as an operator.

Syntax

/ban-ip <target> [<reason>]

// Only on a dedicated server: the command does not exist in single player or in a world opened to LAN.

ArgumentExpectsWhat it does
targetTextone wordAn IPv4 address such as 203.0.113.42, or the name of a player who is connected right now.
reasonoptionalMessageOptional text saved with the ban and shown to blocked players when they try to join.
All 2 forms
  • /ban-ip <target>
  • /ban-ip <target> <reason>

Examples

Ban an address

/ban-ip 203.0.113.42

Blocks all connections from that IP address.

Java 26.3

Ban the IP of an online player

/ban-ip Steve New accounts after a ban

Bans the address Steve is connected from, with a reason saved in the list.

Java 26.3
Build your command

Fill in the fields, then copy the command.

Command generator

When to use it

Use it when the same person keeps coming back with new accounts that /ban cannot stop. The server confirms with This ban affects 1 player(s) and disconnects everyone on that address. Be careful: a family, a school or a public network often shares one IP, so other players can be blocked too, and many home connections change IP over time.

An unknown name or a malformed address gives Invalid IP address or unknown player. Lift the ban with /pardon-ip and check the list with /banlist.

✓ Checked in Java Edition 26.3 · updated 2 November 2026

/ban-ip: FAQ

Can I ban the IP of an offline player?

Only by typing the address itself. A name only works while that player is connected, because the server reads the IP from the active connection.

Does /ban-ip also ban the account?

No. The account can still join from any other address. Combine it with /ban if you want both.

How do I use /ban-ip?

On a server, as an operator or from the server console: /ban-ip <target> [<reason>]. It does not exist in single player.

Who can use /ban-ip?

Server operator, level 3. Only on a dedicated server: the command does not exist in single player or in a world opened to LAN.

Related commands