Domain server acting weird

December 3, 2019 81 views
DNS

I have recently set up my domain name using some tutorials online.
Now I am getting some weird errors.

The domain name only works for me when I use www.domain.com, so domain.com without the www. Does not work. Some users get a 403 forbidden error and some get the website, but not with the www. added.

I am at a loss here.

then the 3 NS rows

1 Answer

Hello,

There could be a few possible causes. I would recommend starting with the following:

  • Run a check for both your www and the non-www versions of your domain via the DigitalOcean DNS tool:

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

You need to make sure that both versions return the droplet’s IP.

  • Note that whenever you make a DNS change, it could take up to 48 hours for the DNS cache to clear over the Globe before you could see your DNS changes.

  • Check your Apache/Nginx access and error logs - there you would be able to see exactly why the users are getting the odd errors that you’ve mentioned

  • Make sure that your Apache Vhost or Nginx Server block, includes both your www and the non-www versions of your domain name.

Hope that this helps!
Regards,
Bobby

Have another answer? Share your knowledge.

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