New Subdomain A Record Not Working

July 3, 2019 231 views
DNS DigitalOcean Ubuntu 18.04 Ubuntu

I have a droplet that is running multiple sites and subdomains using Apache2 and Virtual hosts following a DigitalOcean tutorial. However, I'm trying to add a new subdomain and the A record does not seem to be working and running apache conf test i don't get any errors. Any ideas what it might be?

1 Answer

Hello,

Can you please confirm when did you make the DNS change for this subdomain? Note that it could take from 2 up to 24/48 hours for the DNS cache to clear over the globe.

In the meantime you could use your local hosts file to skip the DNS lookups for this domain name.

Also as a side note, did you restart Apache after the changes?

Hope that this helps!
Bobby

  • I made the change over 24 hours ago, but it's never taken that long and I've done multiple subdomains on this droplet before. It's also not showing up on any of the points, not just waiting for one specific region, per whatsmydns.com

    I could skip DNS lookup but I need it to be live for others not just me and having them edit their hosts file is unacceptable.

    I restarted both apache, and the droplet multiple times.

    • Thanks for the clarification.

      Then this most likely means that you've not setup the A record correctly. You would need to check your DNS zone again and make sure that it is setup correct.

      If you wish you could provide me with a screenshot and I could check that for you.

      Regards,
      Bobby

      • The A record was created directly in the DigitalOcean control panel, like all the ones before it that work. I'm really not sure what the issue is. I put the name of the subdomain, it directs to my droplet, and the default TTL of 3600 is filled in for me.

        • If you do not add a dot at the end of the record your domain might get appended one more time.

          For exmaple you need to make sure that it is subdomain.yourdomain.com and not subdomain.yourdomain.com.yourdomain.com.

        • Also what you could do is run a DNS looup directly in the DO DNS zone:

          dig subdomain.yourdomain.com @ns1.digitalocean.com

          If this does not return any records, then you've for sure not added the record correctly.

          • Apologies, I've just double checked and the domain is actually not managed by digital ocean, so I had to add the A record elsewhere to make it work. Forgot about that. Thanks for the quick replies though!

          • No problem at all! I'm happy to hear that you've managed to sort it out at the end!

            Regards,
            Bobby

Have another answer? Share your knowledge.