Question

Pointing A address directly to droplet from registrar

Posted October 12, 2021 112 views
DigitalOceanDNS

Hello, this might not be specific to digitalocean, but is it possible for me to point to the droplet IP with an A address from my registrar, instead of going through digitalocean’s nameservers?
This is strictly an educational question, I don’t actually need to point it directly from my registrar. But if not, what would be the thing preventing it and why?

Background info:
I was just creating an nginx+node application, but when I put my domain (which again was pointing an A address from registrar to droplet), the app wouldn’t run on my browser. I tried double checking by pinging my domain, and then pasting the IP to my browser, which was successful.
I was still skeptical about this, maybe it was just my nginx configuration… So I tried just using the default nginx configuration. Accessing it through my other domain (pointed through digitalocean nameserver) works, accessing through IP works, but with the domain directly A server from registrar, it didn’t work.

I’m wondering if there’s a name for whatever mechanism is doing this. Pretty much only for sake of learning more. I would guess the reason is so that people can’t just steal other people’s website by pointing their domain names to their IP? That would be my best guess anyway. But yeah, I’ve been searching for a while but couldn’t find anything about it (since I don’t even know what it’s called).

Thank you lots!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi @jerrytobing,

Your active DNS zone depends on your Nameservers. Basically, where your Nameservers are from there you can control your DNS zone and add whatever records you need or want.

With that in mind, you don’t or need to set your Nameservers with DigitalOcean. You can have them with your registrar. This is as long as your registrar allows such actions.

Hope this helps!

  • I don’t think I get it… I’m sorry.
    I’m just confused as to why nginx won’t run if I give it the domain name which is pointed to the droplet’s IP from my registrar (although pinging the domain does give the correct IP, and I can use the IP to get to nginx)
    I did look up more about DNS zones, but from what I read, it doesn’t have anything to do with my question…

    • Hi @jerrytobing,

      Now, if your DNS is properly configured and your A record points to your Droplet then the issue is not with your DNS but with the setup on the Droplet.

      Can you please share your Nginx config file to see if everything there is correct?

      • @KFSys it might be the droplet itself, but it is in no way the nginx. I have found the term I was looking for, which is “Authoritative DNS”, and as I had guessed, you cannot just point your A address from your registrar, you have to actually be in the same “Zone”.