DNS not resolving IP

domain-name-systemhttp

I want my web-service (185.156.179.139) to be available by app.dotaquiz.org. So I've registered domain name. I've also created an A-record (app-A-185.156.179.139).

GET-request to http://185.156.179.139/users/1 gives OK-200.

GET-request to http://app.dotaquiz.org/users/1 gives 404.

What i am missing?

Best Answer

Your DNS seems fine, app.dotaquiz.org pointing to 185.156.179.139:

;; ANSWER SECTION:
app.dotaquiz.org.       86400   IN      A       185.156.179.139

We can see that there isn't a web page configured for that hostname on the Nginx giving error:

404 Not Found

nginx/1.10.3 (Ubuntu)

You should configure the Nginx server {} section for server name app.dotaquiz.org.

Also, problems with DNS configuration would have caused other kind of errors, like

  • ERR_NAME_NOT_RESOLVED if the record wasn't configured at all
  • ERR_TIMED_OUT / ERR_CONNECTION_CLOSED in case of wrong IP without a web server
  • strange web page or foreign 404 error in case of wrong IP with a web server.

The 200 OK and 404 Not Found are HTTP Response Status Codes (RFC 7231, 6); always related to the HTTP protocol i.e. web server, not domain name service.

Related Topic