By keslert
I’m trying to point a subdomain to my droplet running a nginx server. Somewhere along the way I’ve done something wrong and when I try to go to my subdomain I get “Gateway Timeout: can’t connect to remote host.”
I’m pretty sure it’s an issue with the DNS because when I add my subdomain to my hosts file and point it to my droplet’s ip address everything works great.
The following is my zone file on DO:
$ORIGIN blog.bookroo.com.
$TTL 1800
blog.bookroo.com. IN SOA ns1.digitalocean.com. hostmaster.blog.bookroo.com. 1423974942 10800 3600 604800 1800
blog.bookroo.com. 1800 IN NS ns1.digitalocean.com.
blog.bookroo.com. 1800 IN NS ns2.digitalocean.com.
blog.bookroo.com. 1800 IN NS ns3.digitalocean.com.
blog.bookroo.com. 1800 IN A 104.236.83.209
The domain is managed by NameSilo and I have the following settings:
A 107.161.23.204 NA 172816 www re-direct
A 107.191.99.114 NA 172816 www re-direct
A 142.4.203.239 NA 172816 www re-direct
blog CNAME ns1.digitalocean.com NA 172817 3rd-party
www CNAME lb.cratejoy.com NA 172816 3rd-party
Can anyone see what I’m doing wrong? Thanks in advance!
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!
Isn’t the ip address dependent on the droplet? i.e. if I created a new droplet and wanted to use that I’d have to modify my hosting DNS again rather than just the DO side.
I understand why the new system would work, but can you explain why the old system wasn’t working?
Delete the zone from DO. On namesilo, delete the CNAME record for blog. Create an A record for blog to 104.236.83.209.
Don’t over-complicate things, and I highly recommend learning more about how DNS works.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
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
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.