I can't set up a redirect from domain to IP.

I have a server that runs on my home PC, static IP address. I purchased a domain and want to do a redirect from the domain to the IP. Did everything according to the guides but it doesn't work. A Recording is configured. SRV Recording is configured. But it doesn't work, when connecting to the domain writes "Unknown Host".
42 Replies
Admincraft Meta
Thanks for asking your question!
Once you have finished, please close your thread. Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
command to close
/close !close !solved
Requested by zekoyka#0
Arnon001
Arnon0012y ago
Have you opened the port?
zekoyka
zekoykaOP2y ago
Yes, the server works and the players play.
Arnon001
Arnon0012y ago
hmmm can you show the record?
Arnon001
Arnon0012y ago
it should be looking like this (the SRV)
No description
zekoyka
zekoykaOP2y ago
No description
zekoyka
zekoykaOP2y ago
No description
zekoyka
zekoykaOP2y ago
A Record and SRV record.
Arnon001
Arnon0012y ago
service is needed to be _minecraft and try to put the A as "port.<domain>.online
zekoyka
zekoykaOP2y ago
The site says that the _ symbol is automatically substituted.
Arnon001
Arnon0012y ago
oh ok
zekoyka
zekoykaOP2y ago
Why should I rename it to port?
Arnon001
Arnon0012y ago
and in the port section of the SRV put the server port not minecraft port it can make some problem if you have play.example.com:2212 and play.example.com:25565
zekoyka
zekoykaOP2y ago
What is the server port? I have the server running on a separate PC at home.
Arnon001
Arnon0012y ago
go to server.properties and search for a filed called server-port should be looking like this:
zekoyka
zekoykaOP2y ago
Do you mean make the domain as port.domain.online? Instead of play.domain.online? And put in the port address in the SRV Records server IP, not minecraft?
Arnon001
Arnon0012y ago
No description
zekoyka
zekoykaOP2y ago
ahhh
Arnon001
Arnon0012y ago
lets say i have a server in here: at ip 1.1.1.1 and port 34 so I'm doing "A" record and then this:
No description
zekoyka
zekoykaOP2y ago
No description
Arnon001
Arnon0012y ago
No description
Arnon001
Arnon0012y ago
do just 'A' record, you have the default mc port
zekoyka
zekoykaOP2y ago
I have the usual minecraft ports listed here. Not 2312 ah okey That is, A record to change to?
zekoyka
zekoykaOP2y ago
No description
Arnon001
Arnon0012y ago
Remove the SRV, leave just the 'A' record, to your pc ip
zekoyka
zekoykaOP2y ago
I've already tried it, it still doesn't work. When I left just one record of A.
Arnon001
Arnon0012y ago
Then I don't really know how to help, sorry
zekoyka
zekoykaOP2y ago
I already have a redirect to A records to my IP, but it does not work. Thanks anyway for the help and advice.
Discount Milk
Discount Milk2y ago
Define "does not work" What I'd recommend is to transfer your dns servers to cloudflare and use theirs.
Discount Milk
Discount Milk2y ago
Change your nameservers (Full setup) · Cloudflare DNS docs
If you want to use Cloudflare as your primary DNS provider and manage your DNS records on Cloudflare, your domain should be using a full setup.
Arnon001
Arnon0012y ago
Agreeing with him, cloudflare more convenient
zekoyka
zekoykaOP2y ago
With one A Record, that is redirect from the sub-domain play.domain.online to my IP - does not work. I try to connect by domain to the server inside minecraft, but it doesn't work and the error "Unknown host" comes out
Discount Milk
Discount Milk2y ago
Did you check to see if your dns records propagated to your computer? Open cmd ping blah.domain.tld, see if your IP shows up there.
zekoyka
zekoykaOP2y ago
Yes, it pings, I get a reply with <1ms.
Discount Milk
Discount Milk2y ago
Wait, you're trying to use your public IP internally?
zekoyka
zekoykaOP2y ago
Well, I have a computer at home, my IP is static - from my ISP.
Discount Milk
Discount Milk2y ago
Often times your router won't let you do that. Hairpin NAT isn't enabled by default on many residental routers. https://mcsrvstat.us/ Check to see if it is working using this site.
zekoyka
zekoykaOP2y ago
I don't have NAT. I have a dedicated IP and players are already playing on my server.
Discount Milk
Discount Milk2y ago
Everyone uses NAT.
zekoyka
zekoykaOP2y ago
Figuratively speaking.
Discount Milk
Discount Milk2y ago
No, literally speaking There are multiple different types of NAT. You're probably thinking I mean CGNat, which I don't. Hairpin NAT is when a router is able to send traffic from internal to internal using the routers external IP.
zekoyka
zekoykaOP2y ago
If I enter my IP on the site that is the IP of my server is real - it does not work, if the domain address - it works. Information about my server is displayed. Oh, it's working. Thank you guys for your help. @Señor Leche @Arnon001 !

Did you find this page helpful?