Back to lessons

Hosting Operations

Inspect Response Headers

You need to inspect server and security headers quickly.

Command

curl -sI https://example.com

What changed

Nothing changes. The command prints response headers only.

Danger

safe

When to use it

Use this to check redirects, server headers, cache headers, and security headers.

When not to use it

Do not use headers alone to validate page content or application behavior.

Undo or recovery

No state is changed.

Expected output

HTTP status and response headers.

demo script

Disposable terminal steps

  1. curl -sI https://example.com
  2. curl -sI https://example.com | grep -i "x-content-type-options\|server"
  3. curl -I http://example.com

simulated output

What it looks like

disposable vessel
::fixture-ready::
$ curl -sI https://example.com
HTTP/2 200
server: fake-nginx
x-content-type-options: nosniff

::exit-code::0
$ curl -sI https://example.com | grep -i "x-content-type-options\|server"
server: fake-nginx
x-content-type-options: nosniff
::exit-code::0
$ curl -I http://example.com
HTTP/1.1 301 Moved Permanently
Location: https://example.com/

::exit-code::0

YouTube Short

Inspect headers before guessing.

A page can load while headers reveal redirect, cache, or security problems.

LinkedIn hook

The page loaded, but the headers told the operational story.

Question: Which header do you check first on a new site?

experiments

A/B tests to run

Metric: linkedin_save_rate

A: Inspect response headers.

B: The page loaded, but the headers told the story.