DNS routing question - to many options

August 5, 2019 209 views
DNS

Hello,
after reading

  1. How To Point to DigitalOcean Nameservers From Common Domain Registrars
  2. How does DO verify domain ownership?
  3. How do I map subdomain from Godaddy to DO Droplet?
  4. How do you point a subdomain to DigitalOcean without using or the original domain or changing nameservers?

I still have difficulties understanding the domain lookup routing

I have domain mysweetdomain.love registered at the domain registrars MyRegistrarsBuddy and would like to add a forum using the discourse droplet and shall be accisble by the subdomain discourse.mysweetdomain.love

Now I have to options that discourse.mysweetdomain.love can be reached by all the nerds around the world.

  1. use DigitalOcean nameservers, what can be changed in the DNS settings area of my domain registrars

    This means to tell my MyRegistrarsBuddy to ask ns1.digitalocean.com to tell him where to find the asset (app) associated to the domain name.

    That means if a user types discourse.mysweetdomain.love his DNS provider (most likely his internet service provider, IPS) will ask other nameservers (DNS server provider) who is the owner of mysweetdomain.love, ending up at nameserver of MyRegistrarsBuddy. The IPS will ask him where discourse.mysweetdomain.love is located. This in turn causes my MyRegistrarsBuddy to ask DigitalOcean nameservers where the droplet is located, who in turn responses with its IP address

  2. add in A record pointing to the IP address of the droplet
    This causes that my MyRegistrarsBuddy knows exactly where the droplet is located.
    That means if a user types discourse.mysweetdomain.love his DNS provider (his IPS) will ask other nameservers who is the owner of mysweetdomain.love, ending up at nameserver of MyRegistrarsBuddy. The IPS will ask him where discourse.mysweetdomain.love is located. As I added an A record pointing to the IP address of the droplet, the nameserver of MyRegistrarsBuddy responses with the correct IP address.

What I still don’t understand, why NS records (ns1.digitalocean.com, ns2.digitalocean.com, ns3.digitalocean.com) are added automatically do the DNS records in the domain management of my project?

4 Answers

Hi StefanMueller83,

I’m not sure I fully understand your last question but let me try and clarify your situation and what would be best in my opinion.

Changing your nameservers

If you change your nameservers to

  • ns1.digitalocean.com
  • ns2.digitalocean.com
  • ns3.digitalocean.com

You will control your DNS from Digital Ocean. This means, you’ll manage all your records like A, MX, CNAME etc from DO.

Pointing only the A record of the subdomain

Now, this process will be simpler now and with few steps but might create some confusion in your end after some time.

Let me clarify, it’s easier to just change your A record of discourse.mysweetdomain.love to point to your new droplet. Changing the A record would ensure your subdomain loading from your droplet. That’s it, you would be ready to go.

The negative part would be everytime you need to do a DNS change, you’ll need to login to your MyRegistrarsBuddy account and manage the records from there.

In your situation, I would suggest the second option. Once you have a wider knowledge of how DNS work, it would be a peace of cake to just change your NS

Let me know if this answer was actually helpful to your situation.

Hello,

yes both your points are correct.

Adding ns1/ns2.digitalocean.com as you nameservers will actually force you to manage your DNS for Digital Ocean. This won’t be a bad idea as you’ll have your droplets configured here as well.

As for your Question number 3. The NS are actually added by default. A domain name, can’t have proper DNS without it having available NS.

Kind regards,
Kalin D.

it looks that you understood 1 and 2 and they are right, aren’t they?

The negative part would be everytime you need to do a DNS change, you’ll need to login to your MyRegistrarsBuddy account and manage the records from there.

I that is well descriped, easy to understand :)

But why shall I add all three servers, there could be reason I need other nameservers involved as well in the settings of my MyRegistrarsBuddy. Why not just adding ns1.digitalocean.com and ns2.digitalocean.com? (question 4.)

Question three:
see picutre below, why are the NSs are added?
2019-08-05-21-40-34-Window.png

@Kdimitrov thank you for the quick answers but I cannot follow you wording

  1. Question 4 -> force you to manage?

    what do you mean by force you to manage? Do you mean I’m forced to manage all DNS related things within the control panel of Digital Ocean instead in the settings of the Domain Registrar?

    Adding ns1/ns2.digitalocean.com as you nameservers will actually force you to manage your DNS for Digital Ocean.

    Moreover, assume that I have apps on vultr.com reachable as subdomains of mysweetdomain.love, DSN things mangaged on vultr.com. That makes it necessary to add ns1.vultr.com too.

    As I have limited nameserver entries I would do

    1. ns2.uk.domains.coop Domain Registrar’s nameserver (for the main domain site, hosted on e.g. siteground once and forever)
    2. ns1.digitalocean.com Digital Ocean’s nameserver
    3. ns1.vultr.com Vultr’s nameserver

    Are they any reasons I should not do it like this besides redundancy/availability concerns

  2. Question 3 -> DNS without it having available NS
    You mean a nameserver must be aware of it. By adding NS - discourse.mysweetdomain.love - ns2.digitalocean.com, the Digital Ocean’s nameserver ns2, is aware of discourse.mysweetdomain.love, isn’t it?

    The NS are actually added by default. A domain name, can’t have proper DNS without it having available NS

  • Please excuse me if I’m not making myself clear. I’ll try and break it down a bit more, please let me know afterwards.

    Let’s begin with your questions

    1. Question 4

    You can have and must use only one Nameservers. Basically, you can either use Digital Ocean’s Nameservers, your registrars Nameservers or some other third party Nameservers like Vultr.

    If you decide to use

    • ns1.digitalocean.com
    • ns2.digitalocean.com
    • ns3.digitalocean.com

    Your DNS will be managed from Digital Ocean’s control panel. This doesn’t mean you can’t have other services with vultr.com or infact anywhere else. Depending on which Nameservers you use, that’s where your DNS will be managed. By Managed, I mean that you’ll control your domain/subdomains A/MX/CNAME records from the said place.

    *Let me give you an example:
    *

    Imagine, I have a domain name called kdimitrov.com and my Nameservers are

    • ns1.digitalocean.com
    • ns2.digitalocean.com
    • ns3.digitalocean.com

    This means I’ll manage my DNS from Digital Ocean’s control panel. Now, my A record for kdimitrov.com points to my droplet with Digital Ocean but I want to use my domain forum.kdimitrov.com with an external provider, let’s say vultr.com. What I need to do, is change the A record of forum.kdimitrov.com from where my DNS is managed, in this case Digital Ocean, to the IP of my vultr.com’s service.

    Once I do, this will ensure my subdomain forum.kdimitrov.com loads from where it’s needed and my DNS is still being managed from Digital Ocean.

    Please let me know if this example was of help to you.

    2. Question 3

    Let me try and clear how DNS work as I think the articles you’ve read have confused you a bit. Don’t worry, it’s understandable!

    Let’s start from the beginning.

    You have a domain name kdimitrov.com. By default your domain name does not have DNS. In order to have DNS, you need to save it somewhere everyone can see it. This is where Nameservers come in place.

    Every time someone tries to open your website - kdimitrov.com, their computer finds the Nameservers of the domain kdimitrov.com has configured and searches for the DNS there.

    Think of Nameservers as a Phonebook. To find a phone number, you search in it. It’s the same with Nameservers and DNS. To find a certain DNS record you’ll need to search the domain’s Nameservers.

    Now, you can add as many DNS records as you want and you have no limitations of what IP addressed you add.

    That’s it, but let me summarize it for you:

    • You can use only one Nameservers, so you can’t use ns2.uk.domains.coop,ns1.digitalocean.com and ns1.vultr.com altogether. You would need to choose one of those 3 and use all of their Nameservers.

    • Once you choose your Nameservers, your DNS will be controlled from there meaning you’ll manage everything from one place.

    • If you wish to point your subdomains DNS records to other providers like vultr.com, you’ll need to do it from where your DNS is being controlled. And your DNS is being controlled by your Nameservers.

    Please let me know if this became clear to you.

    • That helps a lot :) thank you very much

      In such a case you have apps on Vultr and Digital Ocean you have to decide which control centre is more comfortable or which runs fewer apps, respectively (besides moving to a single hoster).

      In that case, a DNS related change at one place may cause an action on the other place.

Have another answer? Share your knowledge.