SRV records not working

Hey! I'm trying to host a few minecraft servers on my server computer. I want to have them connected to domains and I want users to be able to join without having to write the port. I think SRV records are the correct solution to this. The server is running at port 25569 My current dns setup looks like this:
A record: server.example.com -> IP address
SRV record: _minecraft._tcp.server.example.com -> 30 5 25569 server.example.com
A record: server.example.com -> IP address
SRV record: _minecraft._tcp.server.example.com -> 30 5 25569 server.example.com
Clients can currently connect with domain and the port. But not without the port.
26 Replies
ProGamingDk
ProGamingDk2y ago
dont have the a record and srv record on the same subdomain (its possible but eh more hassle imo)' just set A record to A.example.com and then make the srv target the A record
Anto
AntoOP2y ago
how would I do that? sorry I don't understand
ProGamingDk
ProGamingDk2y ago
u have a A record already just change its name to A so it would be A.example.com
Anto
AntoOP2y ago
yea did that
ProGamingDk
ProGamingDk2y ago
now wait for ttl
Anto
AntoOP2y ago
300 sec
ProGamingDk
ProGamingDk2y ago
ouch
Anto
AntoOP2y ago
sorry ment secs 5mins
ProGamingDk
ProGamingDk2y ago
ah
Anto
AntoOP2y ago
aws says its in sync now @ProGamingDK
ProGamingDk
ProGamingDk2y ago
have u tried joining?
Anto
AntoOP2y ago
unknown host
Anto
AntoOP2y ago
my dns setup looks like this
No description
Snow Kit
Snow Kit2y ago
what do you get if you run nslookup -type=srv _minecraft._tcp.play.example.com
Anto
AntoOP2y ago
Server: 127.0.0.53
Address: 127.0.0.53#53

Non-authoritative answer:
_minecraft._tcp.rautacraft.[server].fi service = 30 5 25569 a.[server].fi.

Authoritative answers can be found from:
Server: 127.0.0.53
Address: 127.0.0.53#53

Non-authoritative answer:
_minecraft._tcp.rautacraft.[server].fi service = 30 5 25569 a.[server].fi.

Authoritative answers can be found from:
Snow Kit
Snow Kit2y ago
and does a.[server].fi resolve to your server's IP?
Anto
AntoOP2y ago
yes a.[server].fi:25569 works finme
ProGamingDk
ProGamingDk2y ago
your isp might not support srv records
Snow Kit
Snow Kit2y ago
nslookup should use the same nameservers as minecraft
Anto
AntoOP2y ago
wtf I did nothing and now it suddenly works average dns moment
Snow Kit
Snow Kit2y ago
should've probably also told you to do ipconfig /flushdns if you were on windows
Anto
AntoOP2y ago
im on linux
Snow Kit
Snow Kit2y ago
Also, setting your dns name servers to 8.8.8.8/8.8.4.4, 1.1.1.1/1.0.0.1 or 9.9.9.9/149.112.112.112 may help figured by the 127.0.0.53 as your dns resolver
Anto
AntoOP2y ago
well dns is always wired
Snow Kit
Snow Kit2y ago
it would be systemd-resolve --flush-caches on most linux distros
Anto
AntoOP2y ago
not the first day I have spent fighting with dns servers thank you both for help :)

Did you find this page helpful?