0

I recently bought a domain name from Namecheap (pythonbiz.com) and I set up a web app on a VPS hosted at servercheap.net (a Ghost blog which is basically a Node app), the VPS public IP address is 107.152.32.52 and the app is served through nginx.

I kept the default Namecheap DNS nameservers and added an A record from Namecheap dashboard that points directly to the server IP address (107.152.32.52).

However, I can't load the website, I keep getting ERR_CONNECTION_REFUSED in both Chrome and Opera, even after emptying my system DNS cache as well as Chrome DNS cache.

Besides, after running the following command on a Linux machine :

dig A +short pythonbiz.com

It returns the correct server IP address, so I can't find the problem. It has been like that for around 4 hours, I know that I have to wait up to 24 hours but Namecheap DNS is generally fast and take effect in 30 minutes.

I did not face the problem when I used Digital Ocean as a VPS provider, the A record updated in 30 minutes.

  • 2
    "but Namecheap DNS is generally fast and take effect in 30 minutes." That is not how the DNS works. Caches keep data for the TTL period, hence any change won't be seen before that. Also and more important, `NS` records in parent zone aka .com have a TTL of 2 days, so you might need to wait for up to that time. Things like "I know that I have to wait up to 24 hours" are wrong/false even if repeated everywhere. Only the TTL counts. " the A record updated in 30 minutes." and what was its TTL? probably in the order of minutes, hence... DNSViz shows your domain correctly configured, so just wait. – Patrick Mevzek Aug 11 '22 at 23:51
  • 2
    The A record on apex has a 30 minutes TTL. But if nameservers were changed then the 2 days `NS` records at parent TTL has to be taken into account. You don't have any `www` record. Also `ERR_CONNECTION_REFUSED` in browser is NOT DNS related, in fact it shows DNS succeeded somehow as the browser attempted to connect somewhere (so it did get an IP address) but that connection wasn't established properly (no webserver running, etc.) – Patrick Mevzek Aug 11 '22 at 23:54
  • Are you sure it is a DNS problem? I'm getting a 502 hitting your site. If you are doing a dig on your domain, getting the correct address, but the site isn't working, it sounds like it is a server side issue and not DNS. – cutrightjm Aug 12 '22 at 02:31

1 Answers1

0

I See there's no problem with DNS Configuration, and the root domain A record already resolv in my side:

dig pythonbiz.com +noall +answer
pythonbiz.com.      1691    IN  A   107.152.32.52

It seems your problem related to webserver configuration, because it show 50x error code:

curl -Ik pythonbiz.com

HTTP/1.1 502 Bad Gateway
Server: nginx/1.18.0 (Ubuntu)
Date: Fri, 12 Aug 2022 03:00:55 GMT
Content-Type: text/html
Content-Length: 166
Connection: keep-alive

I suggest you to check error_log on the server side, for further information related the error.

YonzLeon
  • 311
  • 1
  • 6