Ban an address
/ban-ip 203.0.113.42Blocks all connections from that IP address.

/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.
/ban-ip <target> [<reason>]// Only on a dedicated server: the command does not exist in single player or in a world opened to LAN.
| Argument | Expects | What it does |
|---|---|---|
| target | Textone word | An IPv4 address such as 203.0.113.42, or the name of a player who is connected right now. |
| reasonoptional | Message | Optional text saved with the ban and shown to blocked players when they try to join. |
/ban-ip 203.0.113.42Blocks all connections from that IP address.
/ban-ip Steve New accounts after a banBans the address Steve is connected from, with a reason saved in the list.
Fill in the fields, then copy the command.
Command generatorUse 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
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.
No. The account can still join from any other address. Combine it with /ban if you want both.
On a server, as an operator or from the server console: /ban-ip <target> [<reason>]. It does not exist in single player.
Server operator, level 3. Only on a dedicated server: the command does not exist in single player or in a world opened to LAN.
/pardon-ipServer/banlistServer/pardonServer/kickServer/whitelistServer/stopServer/save-allServer/save-offServer