The IT Handbook

← All cheat sheets

Windows and Linux

Website checks

These sit at the edge of networking, and they come up constantly in 'the site is broken' tickets.

QuestionCommandWhat a good result looks like
See only the status code and headerscurl -I https://example.comA status line such as 200 for success, 301 for a redirect, 403 for forbidden or 500 for a server error.
See the full connection detailcurl -v https://example.comShows the TLS handshake, the certificate details and the request and response headers.
Use the PowerShell versionInvoke-WebRequest https://example.comReturns a StatusCode of 200 and the page content, or an error that names the failure.
Run real curl in Windows PowerShell 5.1curl.exe -I https://example.comThe same output as curl on Linux. Plain curl is an alias for Invoke-WebRequest in that version of PowerShell.
See failed requests in the browserPress F12, then open the Network tabFailed requests show with their status codes. The Console tab lists JavaScript errors.
Rule out a stale pageClear the site's cache and cookies in the browser settings, then reloadOften fixes a page that looks wrong or will not update.

Windows includes curl.exe, and Microsoft documents the PowerShell alias in curl on Windows.