Question

NameCheap subdomain doesn't point to a DigitalOcean Droplet

Hey, this question might be incredibly stupid and I apologise, but it’s been bugging me for a couple of days:

I have a droplet on DigitalOcean that I would like to be linked to the subdomain api.domain.com, while the main domain domain.com is linked to a website on Vercel.

DNS management is delegated to Namecheap and for a number of reasons we would like it to stay that way.

The website (Vercel) works perfectly, while the subdomain that - in theory - should connect to my droplet gives me the error: “DNS_PROBE_FINISHED_NXDOMAIN”

I’m pasting the configuration of Namecheap and that of DigitalOcean.

Can you advise me? There’s definitely something I’m doing wrong

Digital Ocean DNS config: Digital Ocean DNS config

Namecheap DNS config: Namecheap DNS config


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.

alexdo
Site Moderator
Site Moderator badge
April 29, 2024

Heya, @neonloneliness

I’ll also recommend to check the DNS records using our DNS lookup tool and ensure they’re correct.

https://www.digitalocean.com/community/tools/dns

Also as mentioned the DNS propagation might take up to 24 hours due to DNS cache from ISPs and also local DNS cache is a factor when it comes to updating DNS records. You can always flush local DNS cache to ensure the problem is not happening on your local device.

Regards

KFSys
Site Moderator
Site Moderator badge
April 29, 2024

Heya @neonloneliness,

Just so that I get it straight, you made your nameservers to be DigitalOcean onaces and started managing the DNS from DigitalOcean is that correct?

For that to work you’ll need to make your nameservers

where your Domain is being managed by(most probably from where you bought it), in this case probably Namecheap. Then your DNS will work.

Bobby Iliev
Site Moderator
Site Moderator badge
April 28, 2024

Hey!

This actually looks all correct, when did you make that change? Usually, it can take up to 24 hours for the DNS cache to clear over the Globe before you can see the actual changes.

Do you get the correct records back when using a DNS lookup tool like this one here:

https://www.digitalocean.com/community/tools/dns

Besides that, the way that you’ve got this setup is correct where you now should be able to manage your DNS records for your subdomain via your DigitalOcean account. But a simpler setup for subdomains is usually to just add an A record for your subdomain to point to the IP address of your server. There should be no need to add NS records and to add the domain under your DigitalOcean account.

Adding just the A record under your NameCheap account is enough. You would usually add the NS records and add the subdomain under DigitalOcean if you wanted to manage more DNS settings for that specific domain via your DigitalOcean DNS zone.

Let me know how it goes with the DNS propagation and if it has been more than 24 hours, I could suggest removing the subdomain from your DigitalOcean account, deleting the subdomain NS DNS records, and only managing the A record for the subdomain via the NameCheap DNS zone.

Best,

Bobby

Try DigitalOcean for free

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

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.