
Modrinth · Fabric · Client mod
ServerAddressSpaceFix
ServerAddressSpaceFix is a client-side mod. Install it on your computer; the server does not need it.
Fix the "unknown host" bug when adding a server or connecting directly to a server with a space at the end of the server address
- Downloads
- 178.0K
- Author
- TheWhiteDog9487
- Loader
- Fabric
- Minecraft
- 1.20 – 26.3
- Updated
- –
Setup
Install ServerAddressSpaceFix on your client
Client-side mods only run on your computer. More server RAM does not change their performance.
- 01
Install the loader locally
Install Fabric for your Minecraft version in your launcher.
- 02
Download the file
Download the ServerAddressSpaceFix file for your loader and your exact Minecraft version, for example 26.3.
- 03
Add it to the mods folder
Put the .jar file in your local .minecraft/mods folder and remove older duplicates.
- 04
Launch
Launch Minecraft with the loader profile. Nothing needs to change on the server.
- On the server
- Not needed
- On the client
- Required
- Loader
- Fabric
- Minecraft
- 26.3, 26.2, 26.1.2 +21 more
- License
- Do What The F*ck You Want To Public License
Releases
Published releases
Pick the file that matches your server’s loader and Minecraft version. The server and players need the same release.
ServerAddressSpaceFix · ModrinthOriginal description by the project author
ç®€ä½“ä¸æ–‡ï¼ˆGitHubï¼‰Â Â Â Â ç®€ä½“ä¸æ–‡ï¼ˆGitea)    English(GitHub)    English(Gitea)
Introduction
This mod is intended to fix a bug that was reported on November 26, 2021 and still has not been fixed.
Bug tracker link
Features
If the server address you enter on the "Add Server" or "Direct Connect" screen contains spaces at the beginning, the end, or in the middle, this mod will automatically remove them.
This prevents the "Unknown Host" bug mentioned above.
Why this mod exists
A few months ago, I wanted to play on a server. I copied the address from the server's official website, pasted it into the "Server Address" field, saved it, and unexpectedly got an "Unknown Host" error.
No panic, this was obviously DNS failing to resolve the corresponding address. Let's try pinging it first.
Ping could resolve the domain name to an address, and then I suspected the Great Firewall might be doing something again, so I used a tool from ZhanZhangJia to test it. The results were exactly the same as mine.
That was rather strange.
Then, after fiddling with it for a while, I found the problem.
There was a space at the end of the server address I copied.
That was pretty hard to accept. After continuing to tinker for a while and confirming that the problem could be reproduced reliably, I submitted a bug report to the tracker.
And guess what?
My English is completely terrible, so I did not continue talking about it. The issue description was written using a translator.
But honestly, I felt this was kind of absurd.
Since your address is a String, how hard could it be to call trim on it afterwards?
Also, as a player, when you tell me, "This was your own carelessness, so it does not even count as a bug," I cannot accept that.
So, this mod was born.
Configuration file
- If you have version isolation enabled, it should be located at
.minecraft\versions\<version name>\config\ServerAddressSpaceFix.json5 - If you do not have version isolation enabled, it should be located at
.minecraft\config\ServerAddressSpaceFix.json5
This is just a regular JSON text file, except that JSON5 supports additional features such as comments.
All properties include comments, covering things such as functionality, value ranges, types, default values, and more.
You can edit it with a normal text editor.
You can even edit the configuration file while the game is running; it will be applied automatically after saving.
Known issues
All known issues have been fixed. If you find any new ones, please let me know.
If anyone is willing to help fix a bug, PRs are welcome ╰(°▽°)╯
License
I use the even more aggressive WTFPL than MIT.
Does ServerAddressSpaceFix need to be installed on the Minecraft server?
No. Modrinth marks ServerAddressSpaceFix as unsupported on the server side. Install it only in your local mods folder. Your server can stay unchanged unless the project page lists an additional dependency.
Which version and loader does ServerAddressSpaceFix require?
Use a file for Fabric and your exact Minecraft version. Supported versions include 26.3, 26.2, 26.1.2. Files for different loaders are not interchangeable.
ServerAddressSpaceFix is not working – what should I check?
First check the Minecraft version, loader version and required dependencies. Because the mod is client-side, more server RAM will not fix it.
Similar mods
Popular mods in the same category
Client only
Sodium
by jellysquid3
A high-performance rendering engine replacement for Minecraft, which greatly improves frame rates and reduces micro-stutter.
Client only
Iris Shaders
by coderbot
A modern shader pack loader for Minecraft intended to be compatible with existing OptiFine shader packs
Client only
Entity Culling
by tr7zw
Using async path-tracing to hide Block-/Entities that are not visible
Server-ready
FerriteCore
by malte0811
Memory usage optimizations
Looking for mods for your own server?
The catalog lists mods that run on Minecraft servers.