Minecraft DNS question

I own a host (campfirehosting.com) which allows users to pay by the minute, similar to exaraton. Currently we don't support custom domains since we dynamically update DNS records when the server is started vs stopped. I recently learned, though, that exaraton supports custom domains (https://support.exaroton.com/hc/en-us/articles/360019687257-Custom-domains-server-IPs#:~:text=Additional%20to%20your%20exaroton.me,register%20new%20domains%20via%20exaroton) Does anyone know how this could be achieved? I'm using AWS' Route53 for DNS management which gives me a set of nameservers I could give to customers. It looks like with exaraton you enter their nameservers as NS records and it is able to route a customer's domain to their system. I purchased a custom domain to test this out and pointed my new domain to campfirehosting.com's nameservers but that didn't seem to work-- my suspicion is that I need to add some additional info I've attached screenshots of both the Route53 side and the namecheap side where I purchased that custom test domain
No description
No description
51 Replies
Admincraft Meta
Admincraft Meta8mo ago
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close !close !solved !answered
Requested by walkered#0
Cooleg
Cooleg8mo ago
What makes you think the records arent working? Seems to me like its working just fine at least the a record Directs to the same nginx 404 not found as the api website
Cooleg
Cooleg8mo ago
No description
Cooleg
Cooleg8mo ago
This is what I get when I join if that helps
walker
walkerOP8mo ago
Those records in the screenshot were actually edited in chrome inspect because I didn’t want to reveal the actual subdomain 😅
Cooleg
Cooleg8mo ago
oh
walker
walkerOP8mo ago
But I could create a live test one to share here instead of the fake one That message you shared happens when you’ve reached the CH backend but it doesn’t have a matching subdomain
Cooleg
Cooleg8mo ago
Ah Would probably be helpful ngl
walker
walkerOP8mo ago
I’ll do it but I’m not sure it would be too helpful— though maybe someone would benefit from a DNS diagnostics tool. I’ll go ahead and share it soon
Cooleg
Cooleg8mo ago
also did you inspect element the thing to be set to api.campfirehosting.com instead of a numeric ip or am i stupid
walker
walkerOP8mo ago
Nope just all instances you see of "myserver" but I'll go ahead and create a server with that subdomain so the screenshots match
walker
walkerOP8mo ago
Alright just created a new server with the subdomain "testdomain". The custom domain that I bought was testmcserver.xyz so the URL that should be connectable to should be "testdomain.testmcserver.xyz"
No description
No description
walker
walkerOP8mo ago
I think I might need to create an additional hosted zone in Route53 for this testmcserver.xyz domain
walker
walkerOP8mo ago
The only problem there is I can't route traffic from one hosted zone (the new testmcserver.xyz one) to another (the original campfirehosting.com one). Therefore I can't route traffic to the api server unless I manually input its IP-- which I could do but I'd much prefer to allow DNS resolution to handle that for me
No description
SilentBot
SilentBot8mo ago
If all you're wanting to do is follow their guide and delegate a subdomain to their nameservers so they can manage a record for you, you would just add a NS record to your existing hosted zone, e.g. create the NS record for test, which points at the name servers they provide you, and then add test.yourapex.tld to their panel. This is the same if you do this for a child subdomain, e.g. if you have yourapex.tld with namecheap, have servers.yourapex.tld pointed at Route 53, you would create the NS record within the route 53 hosted zone servers.yourapex.tld with the value of server1 to their provided NS, which would delegate control over server1.servers.yourapex.tld for them to manage. In this case you would use a CNAME record to the known record they manage, but you can still use the Geo routing or simple routing on CNAME records.
walker
walkerOP8mo ago
Just to clarify I'm not trying to use exaraton I'm just listing them as an example of a similar host. I'm trying to implement a way for customers of my own server host to use custom domains. With that said does MC support CNAME? I thought that MC didn't follow DNS records beyond SRV + A
SilentBot
SilentBot8mo ago
As long as there's an A record at the end of the CNAME, yes iirc? Sorry, I didn't understand this you context. You would create a zone for the subdomain they provide you, have them point a NS record in their zone to the nameservers AWS provides you for that zone, and you'd just add records in that zone which would be accessible under the subdomain they delegated to you At minimum, you would only be able to add records at the level of delegatedzone.theirapex.tld and lower, but that does sound like what you're wanting to do Unless they point the apex domains nameservers to you, which would give you full access to add records on the domain, but not allow them to use the domain for anything else (unless you allow them to manage records in your panel) (that's how TCPShield does their protection)
walker
walkerOP8mo ago
Gotcha, so it sounds like going the "hosted zone per custom domain" route would be the play. It also sounds like I'll have to point the A record to the IP address of the API server unless your CNAME point holds true (which would be good, if it works I didn't know that was possible) I also think I could go down to the TLD level (e.g. testmcserver.xyz instead of testdomain.testmcserver.xyz) as long as the only records on their end are the NS records Ah neat
SilentBot
SilentBot8mo ago
Just be aware of the hosted zone limits with route 53 (500 per account) And $0.50 per hosted domain (plus DNS query costs) So CNAME would be the preferred way
walker
walkerOP8mo ago
Yeah I saw that, my plan was to charge an additional fee for custom domains to cover the difference. AWS also will raise limits upon request (which Im assuming they'd do here) so if I run into that hopefully I can get an increase. But you're right if this can be accomplished without additional hosted zones that would be great. I think the problem is, though, that the hosted zone contains the TLD (i.e. testmcserver.xyz). If thats the case I'm not sure I can point the domain to campfire hosting's api without the additional hosted zone
walker
walkerOP8mo ago
Yeah with the CNAME entry its still not connecting (could be DNS propagation? But its been ~2 hrs. I'll give it 24 just in case)
No description
No description
No description
SilentBot
SilentBot8mo ago
SRV records can't resolve cnames
walker
walkerOP8mo ago
Ahhh gotcha Let me try swapping it around
walker
walkerOP8mo ago
Aha!
No description
SilentBot
SilentBot8mo ago
DNS Setup | TCPShield
This guide will show you everything you need to get your network pointed to your protected CNAME.
SilentBot
SilentBot8mo ago
TCPShields examples hopefully help a little
walker
walkerOP8mo ago
It does, thanks. Unfortunately I think I'll have to create one hosted zone per custom domain because you cant create resource record sets with different domains other than the hosted zone's e.g. RRSet with DNS name testdomain.testmcserver.xyz. is not permitted in zone campfirehosting.com. is the error you get when you try to do that
SilentBot
SilentBot8mo ago
Yeah, depending if you do want to fully manage it for your customer (NS) you would If you're fine just managing the CNAME your customer points to, and having them setup the srv, you wouldn't
walker
walkerOP8mo ago
Gotcha. I change the SRV port when the server finishes starting so looks like I'll have to just create one hosted zone per customer, but that's okay. Most would be content with the campfirehosting.com subdomain and if they want the custom domain they can pay an extra $0.50 or so per month. Anyways thanks for the help here!
SilentBot
SilentBot8mo ago
No worries, good luck with the setup 🙂
walker
walkerOP8mo ago
Hey @SilentBot wanted to pick your brain a little bit more if that's okay. I'm able to redirect custom domains with subdomains just fine (e.g. test.testmcserver.xyz) but I can't redirect the root domain (e.g. testmcserver.xyz) because the SOA record in Route53 is already taking it and I can't delete it. Do you have any suggestions for workarounds here?
No description
SilentBot
SilentBot8mo ago
You would only be able to do the apex domain by setting the name servers directly in the registrar - only you could have to have full control over the domain. Otherwise you'd have to just use SRV/A records at the top level
walker
walkerOP8mo ago
So if I have customers point their NS records to a hosted zone customized to their domain (in this case we want to point testmcserver.xyz to the hosted zone testmcserver.xyz in my hosted zone) would that work?
No description
SilentBot
SilentBot8mo ago
That's for the subdomain testdomain.your.tld Which would work
walker
walkerOP8mo ago
Right, sorry, this is currently setup for the subdomain use case. I'm wondering what would have to be modified to make it work for the root domain (e.g. testmcserver.xyz)
SilentBot
SilentBot8mo ago
You would have to set the nameserver at this level:
No description
SilentBot
SilentBot8mo ago
in namecheap A NS record will only work for a sub-domain Not the apex domain from my understanding
walker
walkerOP8mo ago
Ahhh right right, that makes sense. And what about at the route53 level since we can't have an apex CNAME. Does it have to be an A record?
SilentBot
SilentBot8mo ago
Depends what you want the record to do, just for Minecraft like when we last discussed this?
walker
walkerOP8mo ago
Right, just for Minecraft. The only stipulation is because this is a "pay by the minute" host we dynamically update route53 records when the server starts and stops so we can't ask the customer to put dynamic information in on their end (e.g. on the namecheap side) The nameservers shouldn't change though, that's static
SilentBot
SilentBot8mo ago
Yeah, makes sense Then you'd have to use an A record / SRV record, yeah As CNAME can't be at the apex
walker
walkerOP8mo ago
Right, I guess the only tricky part is that because A records can't accept domains (e.g. api.campfirehosting.com) I'm not sure how we'll route customers over there. For example, here's one customer's server's records on the campfirehosting.com TLD. This works because A is an alias record that points to api.campfirehosting.com but you can only use alias records inside the same hostedzone
No description
walker
walkerOP8mo ago
This is fine for the subdomain use case (e.g. mysubdomain.testmcserver.xyz pointing to api.campfirehosting.com because we can use CNAME) but this doesn't work for just testmcserver.xyz
SilentBot
SilentBot8mo ago
I believe most providers support ANAME/ALIAS records which mimic a cname at the root level (basically they resolve and put the IPs there if I understand it correctly)
walker
walkerOP8mo ago
So in other words put the IP that api.campfirehosting.com is pointing to into the A record for the apex domain (testmcserver.xyz)?
walker
walkerOP8mo ago
No description
SilentBot
SilentBot8mo ago
So there's no way I can see to do it with Route53 at the Apex Without you using/modifying an A record in the hosted zone you manage for the customer With cloudflare, it's possible with cname flattening, and other providers offer similar features under ANAME/ALIAS records, but Route53 doesn't At least from a pure DNS approach
walker
walkerOP8mo ago
Gotcha, I mean modifying the A record in the hosted zone we manage for the customer is fine since we already do that
walker
walkerOP8mo ago
Assuming it looks something like this
No description
SilentBot
SilentBot8mo ago
Yeah, pretty much If you were wanting to do this for bedrock, the only way would be through an application aware load balancer (assuming multiple customers share the IP)
walker
walkerOP8mo ago
Oof yeah bedrock is another beast entirely haha. Most of our infrastructure for routing requests couldn't be recycled unfortunately

Did you find this page helpful?