Question

My domain's DNS never works

Well, I have a droplet running within DigitalOcean, and then I decided to create an A domain within DigitalOcean with my application’s IP. Inside my droplet, through Nginx, I configured my server with the IP and my port directing it to the domain link.

Although inside my droplet I’m able to call my API through the domain link with a status 200 OK using a curl command, outside the droplet (browser, Postman, PC terminal) when I call the API using curl, it never recognizes it.

So, I gave up trying to run directly with the DigitalOcean domain and started using another registration service, calling my DigitalOcean domain by ‘ns1.digitalocean.com,’ ‘ns2.digitalocean.com.’… However, to my surprise, the registration service says that the search with ns1.digitalocean.com was refused. So, would this be a DNS issue? I can’t understand why my domain on DigitalOcean never works.

PS: Requesting my API by IP and port works normally, but when it comes to the domain this never happens.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

KFSys
Site Moderator
Site Moderator badge
December 25, 2023

Heya @rayjunqueira,

First, if you aim to control your DNS from DigitalOcean, you need to change your Domain’s nameservers to

Remember, you need to change the Nameservers from where your Domain is controlled at. This means where you’ve bought it. Once you have changed the Nameservers, you can follow this tutorial on how to add your DNS to DigitalOcean:

https://docs.digitalocean.com/products/networking/dns/

alexdo
Site Moderator
Site Moderator badge
December 24, 2023

Heya,

If the domain name is using DigtalOcean’s nameservers you can setup the DNS records within your DigitalOcean account. If the domain name is using third-party nameservers the DNS records will need to be configured from the other provider’s service.

DNS changes also take some time in order to update. This will usually clear in few hours, but changes can also take up to 48 hours due to DNS cache from the ISPs.

Happy holidays!

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel