If you ever played on a multiplayer server that isn't a realm, you probably copy-pasted a Minecraft server address at some point, understanding what is a server address can be great if you're a Minecraft server owner or just want to learn more about it.
To play a multiplayer Minecraft game, a server is needed, in simple terms, the server needs to know all information about the players and the world, it is the authority that will say what is happening in the game, and will make the multiplayer experience safer.
A Minecraft server address is nothing more than an IP address, a value assigned to each device, allowing computers to communicate.
What is an IP address?
Before talking about the server IP address, it is essential to understand what is an IP address, IP stands for Internet Protocol, it is nothing more than an identifier used to make our computers able to know where packets are going. Packets can be any data in this example, your Minecraft health value, your coordinates in the game, and so on.
So in basic terms, the IP Address is the ID Card of your device, identifying your device on the network.
But it is not as simple as that! IPs usually look like this: xxx.xxx.xxx.xxx, 4 sets of numbers separated by dots, and this creates a problem... 4 x 3 = 12, we only have 12 digits, meaning that if we fill it with 9 we can know the maximum number of IP addresses, and it is 999.999.999.999.
Okay, so the maximum number of IP addresses is 999,999,999,999? No, not at all! This is the final IP address, not the number of possible IP addresses.
To get the maximum number of IP addresses we need to multiply the sets, 999x999x999x999 = 99,600,599,600.
So finally... 99,600,599,600 is the maximum number of devices? Not really! We filled the IP format with nines, but each set can only go to a maximum of 255, so 255.255.255.255 is the last IP address, and this gives us a maximum of 4,294,967,296 addresses. We will talk about this restriction on the numbers in a bit.
Why 4,294,967,296 is the maximum, and not 99,600,599,600?
- Each set of numbers can only range from 0 to 255
- 0 to 255 gives us 256 possible numbers because it can also be zero!
- Now to know the maximum number, we just multiply 256 * 256 * 256 * 256, and the result is 4,294,967,296, voilà.
The initial calculation would be correct if each set could go up to 999, but that's not the case, the range of 0 to 255 is because the IPv4 is a 32-bit binary number, binary meaning that it goes from 0 to 1 as opposed to decimal, where we count from 0 to 9.
A 32-bit binary number means that we have 32 binary digits to make a number that has either 0 or 1 on each digit, and if we fill each one of these 32 digits with 1(as we did with 9 on the decimal format before) we have the binary number 11111111111111111111111111111111(32 digits here!), by pasting it into any "Binary to Decimal converter" you will get 4,294,967,295.
There is a lot more to this topic and it can get complicated quickly, a lot of information here was abbreviated and you can learn more about this topic online, but to summarize a bit, here are a few key points about IP addresses:
- IP has two versions, IPv4 and IPv6, IPv4 is the one we used above, it has the 32-bit number, IPv6 is a better version, that has 128 bits! It is a lot more and it gives a higher maximum number. Your computer has both, they are used in different situations, a Minecraft server address is an IPv4 number.
- Each device connected to the network has an IP Address, but not all IP Addresses are public. When you "buy internet" from a service provider, that will give you 1 Public Address, and every device using the Wi-Fi and cables from that network will be local, their IP is relative to the local network and aren't publicly available.
- 127.0.0.1 is an IP Address that is used to refer to your machine, also called localhost, on all devices, this will be the local network address of that device.
If you want to know your IP address you can Google "what is my ip" and it will show your public IP Address, remember that the public address isn't the local one for your machine. Giving your public IP Address to strangers can potentially compromise your security, although it is not that easy, ill-intentioned users could attempt to threaten your network in some way with it.
So a Minecraft Server Address is nothing more than this number used to identify a computer on the network, this way your computer can communicate to the server and it will communicate to you back(it knows your IP address because you "talked" to it).
Why aren't all server addresses just numbers?
You probably noticed that some servers, if not all of the most popular ones, will have letters and dots, for example, example.org instead of the IP numbers, how this is possible?
That is called a domain, plaguer.com, google.com, minecraft.net, these are domains that make it easier for you to spell the IP Address, your network has something called a Domain Name Resolver, and it resolves domains like that to their IP Addresses, so they are nothing more than just "pretty names" for the IP.
When you use a domain in a Minecraft server IP, it does the same as with websites, the domain is resolved, and it will use the IP instead for the communication.
Why domains are used in Minecraft servers?
- They look cool
- They are easier to spell, thus it avoids someone misspelling a server IP
- They don't change(unless you change them), public IP Addresses can often dynamically change unless you ask your Internet Service Provider to do something about it, this dynamic change is good for you but if your IP change then everyone trying to connect to your server will now need to change to your new IP
You can get to know the IP address of a domain in your command line!
- Press the Windows key and R
- The Run window will open, here you can type "cmd" and press Enter
ping www.google.comin the command prompt and Enter
- You will get the reply from Google's IP address!
Domains are no mystery and they don't hide anything, an IP Address will always be used to communicate through the network.
Will a Minecraft server owner know my IP Address?
Yes! You know the server IP Address and you use it to communicate, when you send any request to the server it will also know the IP Address the request comes from, and it uses that to give you a response.
Fortunately, although exposing a public IP Address is potentially dangerous, often you're safe by just connecting to popular and well-known servers, the ones with a domain have a plus on safety, but don't take this for granted.
If you don't have an ad-block on, you probably know what a Virtual Private Network is, VPNs can "hide" your IP Address by, in short terms, requesting your name, this way the server will know the IP of your VPN and not your IP.
A VPN is the same as if you ask your friend to ask the teacher a question about the class because you're shy to do it, your teacher will think that your friend asked the question, and your friend will tell you what the teacher answered(in this analogy you would hear it yourself, but let's pretend you're not in class).
But VPNs cost money, and they're not a magical solution, you are now trusting the VPN instead of the server, and their service can do more with your network than the server can.
What is ":25565" in a Minecraft server address?
If you pay attention to details, you will notice at one point or another that some servers always end with the same numbers, 25565, but why?
When you are connecting somewhere and you see a colon(:) punctuation followed by numbers, it means that the numbers after the colon are a port.
You can think of a port as a virtual door, a port in an IP Address means that on that you want to connect to the application listening on that "door".
Every communication is done through ports! Even websites, but there is a catch, some ports are implicit, when you type google.com, your browser will make the requests to google.com:80.
Port 80 is commonly used for websites, knowing that, your browser will automatically add the ":80" for you. Commonly used doesn't mean always, but by not using port 80, the users would have to type ":different port" to connect to the website, and that is annoying!
Technical note: 80 is for HTTP(starting with http://) websites, HTTPS(starting with https://) uses 443, but the browser handles it
Port 25565 is the common port defined by servers, it can be changed to something else, and then you will need to specify a different port.
Ports are the reason why you will see some Minecraft servers with the same website address and the Minecraft server address, its the same domain or IP, but the different applications(the website and the Minecraft server) are "listening" on different ports.
The number 25565 is probably arbitrary chosen, but it is higher than 1024 for a reason, ports with a number between the range 1024–65535 are considered ephemeral ports, it is a dynamically allocated port that won't always be open on your system.
Why do ports need to be open?
When running a Minecraft server, the port 25565, or the chosen port, will need to be "open", an open port can listen to connections coming from other devices on the network, and then the communication can happen.
But wait, if ports need to be open to allow communications, why are they closed to start with?
Ports are closed when they aren't listening to connections, the port simply won't give any response to packets if there's no reason to.
What is Port Forwarding?
The port open or closed terminology is used with Router port forwarding, a Router being the device that manages your local network, receives packets from the public, and sends them to the local network devices.
To understand what port forwarding is we need to understand the public and the local network.
As previously mentioned in this article, you will usually get one Public IP Address each time you "buy" a network.
To illustrate, think about a home network with one Router, and three laptops connected through WiFi. This network will only have one public IP Address, while each one of the three laptops will have a unique private IP Address.
The laptops can communicate with each other on the local network, for example, you could play a LAN Minecraft game connecting through the private IP Address of the laptop running the server. However, another computer trying to connect from outside this local network, won't be able to communicate to the laptop running the Minecraft server, it can only have access to the Public IP that the router has.
By communicating to the Public IP Address, the outside computer won't reach the server, as the router doesn't know which laptop is listening to the server port, in this example, the port 25565.
Port Forwarding will tell the router: "When someone wants to access my public IP on this port, you will send the request to the device with this Private IP on this port". Port Forwarding will make the Router make sure that the outside network computer will communicate to the correct local device.
The bottom line
As you may know by now, a Minecraft server address works the way it does because it is no different than an IP Address, and an IP Address has particular reasons to work the way it does, to support the internet.
Minecraft servers are related to computer networking and there is a lot to learn about it! If you believe that any information on this article is wrong or could have a change, contact us on our email or Twitter!