Pointing domain to website AND mc server using Cloudflare

Discussion in 'Systems Administration' started by ShawnTheSGPro, Sep 27, 2019.

  1. Hey, I'm attempting to point my domain to both my website and mc server using Cloudflare. The website is currently working properly, when I go to https://mydomain.com, it shows the correct webpage. However, I'm not quite sure how to point my domain to my mc server as well. I've read that I need to setup a subdomain for my server. Do I do this through the standard means with a SRV and A record? Or is there something special I need to do for this to work properly? Thanks for reading!
  2. Cool. Thanks!
  3. Strahan


    Well, depends. Is your MC port 25565? If so, you don't need to dick around with a SRV record, just create an A and you're done.
  4. Nah, its a different port. But thats interesting to know, I thought you always needed a SRV record even with a dedicated IP
  5. Okay, well I thought it was solved but apparently it isn't. The reason I thought it was solved was because when I entered the ip on https://mcsrvstat.us/, it said that the server was working. However, when I actually try and connect to the server through Minecraft, I get a Connection timed out: no further information error.
    Here is my current A record: https://gyazo.com/a73c3b6680c8d49d9f92763b05a64f2f
    And here is my SRV record: https://gyazo.com/cbaf51c1ab2d4d02ef6ccd57ca4dd9f2

    Any ideas what could be wrong here?
  6. Strahan


    Well... I've never tried it that way so I'm not 100% sure it's the problem, but you have both the A and the SRV as "mc". I don't recall ever having seen anyone do that; it could be getting confused. Change the A to something else, like "server" then have the SRV target be server.fallenrealms.org

    Then, of course, you may have to wait a bit for propagation after changes.
  7. So you think the problem is the "mc" subdomain? Is it too short or something?
  8. Strahan


    Not the length, the fact that both the SRV and the A are registered with the same subdomain. Again, I have no real technological basis for this guess, and my copy of DNS and Bind is at the office so I can't check, but it seems like something to test.

    EDIT: I just realized I could likely torrent a copy of the book, lol. I checked the chapter on SRV and they specifically talk about having them match up:
    ...so disregard everything I've said :)
    #9 Strahan, Sep 28, 2019
    Last edited: Sep 28, 2019
  9. Alright lol. Any ideas on why it wouldn't be working then? I'm guessing it has to do with the website also using the domain, but I've never done this before so I'm not quite sure.
  10. Based on what you sent it is all setup properly. It can take some time based on the TTL or Time To Live to propagate. Be sure you used the correct IP/Port when you set this up. If its still not working after 24 hours contact the DNS service provider you are using.
  11. Okay. I just wasn't sure since its be nearly 24 hours and normally it only takes a few hours. Guess I'll just wait until tomorrow.
  12. Alright, so new issue. I was able to connect from a PC in one location using the custom IP without any problems. I then went to a different location and different PC, and now Minecraft doesn't even recognize the custom IP. Any ideas of what may be causing this?
  13. Strahan


    When you say "custom IP", do you mean like #.#.#.# or do you mean like whatever.com? If the former, it may be a routing issue. Try a traceroute to it and see if it makes it all the way. If the latter, their DNS may be messed up. Run nslookup and plug in the domain and see if it resolves. If it doesn't, try switching to another DNS server and see if it resolves. If it does after switch, then whatever DNS they are using is funky.

    If Windows, open a command prompt. For the traceroute, type tracert #.#.#.# (obv replacing with the IP). For the DNS check, type nslookup. In that tool at the > prompt type the domain like whatever.com. If you are using a subdomain like mc or play or something, be sure to type that too. If it says "non existent domain" type server and that will use Comcast DNS then try again. If it returns your IP this time, the problem is their DNS. I'd tell them to look into it, and to get them working temporarily open a command prompt and type cd %systemroot%\system32\drivers\etc then attrib -r -h -s hosts then notepad hosts and add to the bottom the entry like:
    #.#.#.# (subdomain if used).domain.com

    Save it and it should work. Of course, if it did resolve the IP when you first tried, it's not DNS then... *shrug*

    PS "exit" is the command to get out of nslookup
  14. I mean example.com as custom IP. I tried switching to cloud flare DNS but no luck, I’ll try what you said and come back with the results, thanks!
  15. Well I tried the nslookup, and when I typed in the domain it said "non-authoritative answer". I guess I'll just contact cloudflare and ask them about it, thanks for the help!
  16. Strahan


    That's fine, it means it did resolve then. Non-authoritative just means it came from a DNS server other than the one you are registered to use.