What to return to browser if DNS lookup failed? - dns

Disclaimer: not sure if this is SO material. If not, please move it to the appropriate place.
I'm trying to build a web proxy, and I'm unsure what to return to the browser, if the DNS lookup failed (ie. if the domain does not exist). Is there a HTTP status code for this? I tried looking in the Network tab in Chrome, but there's no response for a failed DNS lookup.

There wouldn't be an HTTP code for it, since by definition an HTTP request couldn't be done in the first place is the server's IP couldn't be resolved. Probably the easiest-to-use-instead would be 404 - "not found" or 404.1 - "site not found" if you have IIS 7.0+.

Referencing #Dark Falcon's comment and mysterious withdrawal from the question
"Most I have seen return 502 Bad Gateway or 504 Gateway Timeout"

Related

Getting Error 503 when sending request via heroku or any host not local

my Node.js server is supposed to send a GET request to a third-party website vie https.get, but that website returns a 503 error, which is strange, because when I send the exact same request from my own device everything works as intended. Does anybody know what may be the cause of this problem, and how it can be fixed?
EDIT: The website uses CloudFlare, it might be related to theproblem but still - it works in my device.
Checking if the site connection is
shahed4u.vip needs to review the security of
If you are using cloudflare it's just normal, because cloudflare prevent access to bots.
Note: all informatical program making HTTP request are bots, is considered as "true clients" by cloudflare browsers with graphical instance, cookies, and algorythm (check this article on how cloudflare detect "bots")

Intermittent 502 when using cloudflare on azure

I am hosting my website on azure and using cloudflare for dns and proxy.
Recently I started experiencing a problem where if I refresh a page a number of times, eventually I get the cloudflare 502 page. Refreshing the page again and it loads fine.
If I refresh the page without using cloudflare, i.e. I go straight to {mydomain}.azurewebsites.net I don't get the issue.
So obviously the problem is server/cloudflare side config. Any ideas on what could be causing this?
I think it is related to this issue: https://community.cloudflare.com/t/random-502-errors-for-last-3-days-caused-by-illegal-request-header-injected-by-cf-reverse-proxy/202061
The 502 Bad Gateway error is an HTTP status code that means that one server on the internet received an invalid response from another server... so as it stands you don't have enough information to figure out what is going on here.
You will need to find a way to get the web server logs from your server on Azure and possibly also the logs from Cloudflare.

DNS A record pinging to ip but shows error 404

I need to open the content of the ogilvyalbaniaonline.com, at test.whateveryouwant.a2hosted.com
This is done via DNS A record.
If you check the images below, the DNS Configurations are all ok, and if i ping both of the sites, they both show the same IP address. But when i open test.whateveryouwant.a2hosted.com on a browser, it shows 404 error.
what am i doing wrong? advice?
404 is an application error. If you had a DNS issue, you would have not gotten a 404, you would have gotten a connection refused error.
You need to add a index.html to the server root of your filesystem. Nothing to do with DNS at all.

Status 302 Found, when I try to access my web application instead of status 200

Please help me in understanding why we get found 302 status. I googled and get to know that this is something to do with redirect. I have two web applications IIS servers and they configured for round robin DNS.
If I check it from fiddler sometimes I get status 302 instead of status 200, This does not happen every time I visit my website. Because of this HP site scope triggering alerts.
I am new to this error, Please Help me.

500 Internal Server Error

I am getting this error, when I tried to visit my newly setup site. I tried DNS check tools and I see that there are several errors with DNS configuration.
In dnsstuff.com, I am getting these error messages:
Nameservers were found, but the domain entered is a non-delegating subdomain.
No nameservers provided an SOA record for the zone. You should configure your nameservers to have a master slave relationship.
link: http://www.dnsstuff.com/tools#dnsReport|type=hostname&&value=www.simpaticorp.com
With Pingdom tools I am getting these error:
Delegation not found at parent.
No delegation could be found at the parent, making your zone unreachable from the Internet.
Not enough nameserver information was found to test the zone, but an IP address lookup succeeded in spite of that.
I am new to DNS configuration. I read few tutorials. It looks like I need to configure NS records (Not sure though).
Can any please help me to resolve my issue.
Assuming that you are trying to reach
www.simpaticorp.com
(taken from the dnsstuff.com URL), that website is up and reachable. It's DNS seems to be configured correctly.
The error I see while browsing there is an HTTP 500, which means that the website has received the request for the homepage, but encountered an error while processing that request.
Check the Apache error logs to find more information on the error.
https://askubuntu.com/questions/14763/where-are-the-apache-and-php-log-files

Resources