Using DigitalOcean with a different DNS name server
Is there anything you need to do in particular to allow a DigitalOcean droplet to serve content for domains that with DNS configuration managed outside of DigitalOcean?
The Longer Question
I have hit an issue with my setup. I have a domain registered with Fasthosts (let’s say x.com) and I don’t want to migrate all of my DNS records, so instead I just created a subdomain A record in the DNS management tools of Fasthosts (let’s say foo.x.com) and pointed it directly at my droplet IP address.
When I use tools like
"ping foo.x.com“ or ”
dig @220.127.116.11 foo.x.com A“ I get the correct droplet IP address returned. So far, so good…
When I try to reach foo.x.com in my browser I get a
HTTP 403 Forbidden message coming from
What I’ve Tried
I have NGINX configured and running on my droplet, and I know that this is working because I have other domains running successfully in NGINX on the same droplet (but these domains are using DigitalOceans NS servers).
First of all I thought it was a permissions issue for the static files, but I verified the owner and group settings as well as the file permissions via the normal chown and chmod commands.
My next step was to try a curl locally on the droplet using a Host header for foo.x.com and in this case I get a HTTP 200. So it seems to be ok when access on localhost.
Next I tried stopping NGINX and to my surprise I still get the same HTTP 403, whereas - as you’d expect - my other domains are not reachable. So now I’m beginning to think that this is down to the way my DNS is configured.
Since all of my DNS was being handled in the Fasthost configuration I didn’t see why I’d need to configure anything on the DigitalOcean side, but now I’ve tried setting up a A record and CNAME for x.com and foo.x.com with no NS records, I’m waiting for this to propagate, so I don’t know if this solution will work yet…
Can anyone tell me if there is something I’ve missed or should setup for this to work.
Thanks in advance.
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.×