Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Subscribe to our newsletter

Advertise on LowEndTalk.com

Latest LowEndBox Offers

    DNS question
    New on LowEndTalk? Please read our 'Community Rules' by clicking on it in the right menu!

    DNS question

    Intro:
    I'm currently using Cloudflare for DNS. It works fine. I know there's also Hurricane Electric as a decent reputation free one.

    Setup:
    example.com and subdomain.example.com are hosted with different hosting providers.

    Questions:
    Is it possible (and advisory) to not use a "separate" DNS server, but have the domain point to example.com nameservers, while setting up A (and other relevant records) for subdomain.example.com with example.com hosting server (shared/reseller hosting is used)?

    Would that work (much/any) worse (in terms of DNS resolution) for subdomain.example.com, compared to having it hosted as a subdomain with example.com account, on the same server?

    Mostly harmless™

    I/O Gremlin

    Comments

    • WiredBladeWiredBlade Member, Provider

      The DNS queries are generally very fast and are cached. So it would not really make that much of a difference either way. You can also consider hosting the subdomain on Dynu as it is free and easy to manage. Having the main domain on a set of name servers and the subdomain on another set of name servers would work just fine without any concerns.

      Thanked by 1bikegremlin

      Wired Blade, Inc. [AS398019] - Dedicated Servers & VPS in Phoenix, AZ. Dual Xeon E5649, 32GB RAM, 20TB @ 1Gbps - $39.99/mo. with coupon OVERSTOCKED20
      DDoS Protected, Affordable Prices & Excellent Support! 10Gbps available!

    • ras07ras07 Member

      @bikegremlin said:

      Questions:
      Is it possible (and advisory) to not use a "separate" DNS server, but have the domain point to example.com nameservers, while setting up A (and other relevant records) for subdomain.example.com with example.com hosting server (shared/reseller hosting is used)?

      That works fine and is done all the time.

      In addition to he, entrydns.net and dnsexit.com are two other DNS providers I've used with success in the past; might give those a shot if Cloudflare doesn't work out for some reason.

      There's also something to be said for using two DNS separate providers and having everything duplicated, in case one is unavailable for whatever reason.

      Thanked by 1bikegremlin
    • @ras07 said:

      @bikegremlin said:

      Questions:
      Is it possible (and advisory) to not use a "separate" DNS server, but have the domain point to example.com nameservers, while setting up A (and other relevant records) for subdomain.example.com with example.com hosting server (shared/reseller hosting is used)?

      That works fine and is done all the time.

      In addition to he, entrydns.net and dnsexit.com are two other DNS providers I've used with success in the past; might give those a shot if Cloudflare doesn't work out for some reason.

      There's also something to be said for using two DNS separate providers and having everything duplicated, in case one is unavailable for whatever reason.

      Thanks for the replies.

      Cloudflare is working very well - I just wouldn't like the idea of being dependant on it working (and being free).

      Not sure I understand the part of using two DNS providers - how does that work?
      Do I just set nameservers with the registrar to use like:
      ns1.dnsprovider1.com
      ns1.dnsprovider2.com ?

      Mostly harmless™

      I/O Gremlin

    • jsgjsg Member

      @bikegremlin

      The glue records at the domain registrar are only for the TLD. So if you want a different DNS server for the subdomain the DNS server for the TLD must delegate the subdomain.

      You can go both routes. You can have both example.com and subdomain.example.com on one DNS server or you can put them on two.

      As a rule of thumb: If subdomain.example.com is really used as a subdomain you should delegate it. If it's de facto a host you should treat it like that (include it as a host within example.com).

    • @jsg said:
      @bikegremlin

      The glue records at the domain registrar are only for the TLD. So if you want a different DNS server for the subdomain the DNS server for the TLD must delegate the subdomain.

      You can go both routes. You can have both example.com and subdomain.example.com on one DNS server or you can put them on two.

      As a rule of thumb: If subdomain.example.com is really used as a subdomain you should delegate it. If it's de facto a host you should treat it like that (include it as a host within example.com).

      Probably didn't explain what I'm asking. Sorry.

      Didn't plan on using two DNS services (didn't know it was possible really, until @ras07 mentioned it).

      Looking for a way to not rely on Cloudflare, preferably no other DNS service if I don't want to (don't need / have to).

      So, the question is can I set nameservers for example.com hosting server (ns1.provider.com ns2.provider.com usually), then create within the DNS on the hosting server, A records for subdomain1.example.com, subdomain2.example.com subdomainX.example.com and so on, with matching IPs where they are hosted?

      The two DNS option - do I set registrar nameservers to use one nameserver of DNSprovider1, and one nameserver of DNSprovider2, where all the DNS records for all the domains and subdomains are placed?

      I am using subdomains as completely separate websites.

      Mostly harmless™

      I/O Gremlin

    • jsgjsg Member

      @bikegremlin

      Sorry I can't follow. You are too vague. "website" for example has no meaning in DNS. In DNS subdomain.example.com is either a (sub)domain or it's a host.

      As for "I don't want to relay on [one certain DNS provider]": There are two points of control for you, (a) the registrar glue records (but only for TLDs), and (b) the power to decide which of the DNS servers is the one with authority. However (b) also depends on your DNS provider. They may or may not provide a way to set that.

    • @jsg said:
      @bikegremlin

      Sorry I can't follow. You are too vague. "website" for example has no meaning in DNS. In DNS subdomain.example.com is either a (sub)domain or it's a host.

      As for "I don't want to relay on [one certain DNS provider]": There are two points of control for you, (a) the registrar glue records (but only for TLDs), and (b) the power to decide which of the DNS servers is the one with authority. However (b) also depends on your DNS provider. They may or may not provide a way to set that.

      Will try to explain better. Currently Cloudflare DNS looks about like this:

      A example.com 11.11.22.22 (whatever the IP, say IP1)
      CNAME www.example.com example.com
      A subdomain1.example.com IP2
      A subdomain2.example.com IP3

      With the appropriate MX and TXT records used by example.com and the noted/used subdomains.

      Question 1:
      example.com hosting provider - say host1.com.
      Can I copy the records to hosting account (say cPanel) DNS zone editor?
      Then set with domain registrar for example.com to use ns1.host1.com and ns2.host1.com.
      Instead of using ns1.DNSprovider.com and ns2.DNSprovider.com - as is the case now, with Cloudflare being used as DNS.

      Will the subdomain1.example.com and subdomain2.example.com be "reacheable" in that case?

      Question 2:
      If using two DNS services instead. Should I just set all the records from Cloudflare to DNSprovider2, then set the nameservers with the registrar to be like:
      ns1.cloudflare.com
      ns1.DNSprovider2.com
      ?

      Sorry if it's confusing. Trying my best here. :neutral:

      Mostly harmless™

      I/O Gremlin

    • loeloe Member
      edited November 8

      bikegremlin said: Can I copy the records to hosting account (say cPanel) DNS zone editor?

      Sure if you copy all records, cpanel.dns.server will behave the same as whatever.cloudflare.com i.e answer 11.11.22.22 when you ask A for example.com.

      bikegremlin said: Question 2:

      IMO don't bother with that, cloudflare is solid, you might want to avoid them for many reasons (centralization, fuck big corps, whatever) and find an alternative (he.net is reliable as well - and a big corp as well), but you don't need to add another secondary. You keep control on your DNS and can change the provider anytime. If you really want to add another record (not sure if CF tolerates that (?)) you can play with free secondary NS, or manually copy your records to any DNS server: it will answer what it has been told to answer, as long as all server have the same records stored, it will work fine (updates will be more complicated if it's not automated, though - and if you use CF reverse proxy you obviously can't go this route).

      Thanked by 1bikegremlin
    • jsgjsg Member

      @bikegremlin said:
      ...
      A subdomain1.example.com IP2
      A subdomain2.example.com IP3

      So, they are not subdomains but hosts.

      Question 1:
      example.com hosting provider - say host1.com.
      Can I copy the records to hosting account (say cPanel) DNS zone editor?
      Then set with domain registrar for example.com to use ns1.host1.com and ns2.host1.com.
      Instead of using ns1.DNSprovider.com and ns2.DNSprovider.com - as is the case now, with Cloudflare being used as DNS.

      Will the subdomain1.example.com and subdomain2.example.com be "reacheable" in that case?

      Question 2:
      If using two DNS services instead. Should I just set all the records from Cloudflare to DNSprovider2, then set the nameservers with the registrar to be like:
      ns1.cloudflare.com
      ns1.DNSprovider2.com
      ?

      Sorry if it's confusing. Trying my best here. :neutral:

      As for your questions:

      Again, the hosting provider is irrelevant for DNS (or do you mean DNS provider?). And for cpanel I can't say anything because I lack experience with panels.

      Using a 2nd DNS provider doesn't make sense in your case because your "subdomains" are just hosts within you "main" domain.

      So, what you do is:

      • Choose a "main" DNS provider of your choice, say dns-box1.com (who runs ns1 to ns4 dot dns-box.com) that allows you to set any (of their) name servers as authoritative or not (you set it to "yes, authoritative")
      • [optionally] choose a second DNS provider, say CloudF$%# (who run many name servers) who does not insist on (or automatically sets) their name servers being authoritative.
      • set some 2 (min.) or more of the name servers of the DNS provider(s) you chose as glue records with your domain registrar.

      Example: Your domain is 'bg.com' and you choose DNS provider XYZ (running name servers ns1.xyz.com to ns5.xyz.com) as your domain provider.

      • You enter all your records into the mask of the XYZ interface, like so:
        domain: 'bg.com'
        name servers: ns1.xyz.com, ns3.xyz.com
        address records: 'subdomain1.bg.com:1.2.3.4, subdomain2.bg.com:1.2.3.5'
        mail servers: 'your1.mail.provider:10, your2.mail.provider:90'

      • [optionally rinse and repeat with 2nd DNS provider but set to not authoritative]

      • set the name server glue records with your registrar to e.g. 'ns1.xyz.com, ns3.xyz.com [plus optionally:ns1.other.dnsprovider,ns2.other.dnsprovider]

      Alternatively, as I like you, you can simply send me all the info via PM and I'll put your domain on my DNS servers [4+, mostly europe] and you are done. Beware though that I have no panel because I have my infrastructure only for myself and some clients and friends.

      Thanked by 1bikegremlin
    • I personally have my primary domains DNS that has all my nameservers etc hosted on Cloudflare and the rest of my domains are hosted on my cPanel DNS-Only Cluster. I found this combo works really well TBH.

    • Thank you all very much for having taken the time and had the patience to explain.
      Since DNS propagation usually takes some time, this is something I'd rather ask, in addition to googling, before experimenting.

      Going to help a good friend migrate several websites, several different domains, and he is weary of using Cloudflare (as "another thing added in between that can complicate things and break down").
      So I'm considering options. Would like to still be able to host www.example.com and blog.example.com on different hosting servers if needed, but to keep it all working.

      Though I think that even if using cPanel, separate DNS service (like Cloudflare) will most probably end up being the least complicated option, once he figures out all the A, CNAME, MX... etc.

      @jsg thank you very much for both help and the generous offer. I appreciate it.

      Mostly harmless™

      I/O Gremlin

    • OT (maybe?):

      I don't normally see a lot of discussion about using the registrar's DNS .... is there a reason that it is frowned upon, or just not really discussed?

      Is it that this community knows better how DNS works that the average user therefore using CF or HE (or even self hosting) just makes sense -- or is there truly some reason to not use the registrar as the DNS provider?

      Recommended providers: BuyVM - MXroute - LunaNode - Forpsi - IntoVPS

    • jsgjsg Member

      @bikegremlin said:

      First: you are welcome. I just had difficulties understanding what you need.

      So I'm considering options. Would like to still be able to host www.example.com and blog.example.com on different hosting servers if needed, but to keep it all working.

      You can do that with pretty any DNS solution!

      What you do is to simply set two A records for the two servers running www.example.com and blog.example.com.

      Also note that there are diverse tools incl. websites out there that do the "dirty" work for you after you answered some question. Think of it as DNS Wizards. Unfortunately I can't name one because I heard of them but never used one. I guess that some free DNS providers also have help or even "wizards" available.

      Good luck and feel free to contact me if you think I can help.

      Thanked by 1bikegremlin
    Sign In or Register to comment.