This question may sound weird but let's say I have asked to open traffic to cdn.mycompanycloud.com because there's an app to deploy that requires it. This URL does not reply to http requests by the way.
How can I check the URL has been allowed prior to installing the application?
nslookup would only prompt the DNS server so I would certainly always get a reply. ping the URL would actually ping the IP behing the DNS.
Any idea?
Thanks
31 Answer
If it's an https:// URL, it has to reply to HTTP requests, otherwise it wouldn't be an https:// URL.
Indeed, your example does respond – with an HTTP 404 "Not Found":
$ curl -I
HTTP/1.1 404 Not Found
Cache-Control: private
Content-Length: 0
...The response is zero-length, causing most web browsers to substitute their own error pages, but it's still a valid response and you can check for it. (Windows 10 comes with curl.exe, by the way.)
However, there are several "live" URLs at this domain, such as:
YOUR_DOMAIN/winauth/trust/2005/windowstransport
When a GET request is made, it responds with HTTP 200 "OK", showing a pretty HTML-based error page saying "The endpoint only accepts POST requests". For example:
PS> Invoke-WebRequest
StatusCode : 200
StatusDescription : OK
Content : <!-- Copyright (C) Microsoft Corporation. All rights reserved. --> ...(PowerShell can be used to check URLs which return 404, but it's harder.)