Question

DNS_PROBE_FINISHED_NXDOMAIN php DO App Platform

Posted March 23, 2021 201 views
PHPDigitalOcean App Platform

After upload my php website on app platform , i get
DNSPROBEFINISHED_NXDOMAIN.
I already add everything on my composer.json and update it for get a new composer.lock.
I don’t why why i still get DNS error
https://prnt.sc/10tp653

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
2 answers

Hello there,

Keep in mind that DNS changes might take up to 24 hours in order to fully update. Can you please confirm if you’re still experiencing the issue? Also, you can check the DNS resolution using our DNS tool here:

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

Hope that this helps!
Regards,
Alex

You may also try using a command line tool like dig and curl to check the URL.

dig <domain> will show DNS information for the domain.
curl -v <URL> will try to retrieve a web page and show the headers and response body.

If the dig command returns the NXDOMAIN, then the curl command should fail too. The dig command may also show some numbers relating to how many seconds the response is cached (possibly cached on your computer, your ISP’s DNS server, and other layers of DNS querying).

Something to note is that web browsers will try to follow redirects. Curl does not by default. You may see something like this:

< HTTP/1.1 301 Moved Permanently
< Location: https://my-test-app.ondigitalocean.app/

in which case you will need to do another curl using the URL in the Location header that was returned.

You may also see something like this:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://www.my-test-app.ondigitalocean.app/">here</a>.</p>
</body></html>

Note that the reference in the response has a different URL than the original. In this case it is being redirected to a with www. appended to the beginning of the URL. If you try to follow that redirect, you will get a NXDOMAIN as the app platform doesn’t set up a DNS for subdomains on the auto generated ondigitalocean.app domain. If you are using a custom domain, make sure that the www subdomain is also attached to the app.