Просмотр заголовков сайта с помощью curl

Чтобы посмотреть заголовки сайта, достаточно воспользоваться утилитой curl:

curl -v -s https://yandex.ru 1> /dev/null

Вы получите примерно такой ответ:

* About to connect() to yandex.ru port 443 (#0)
* Trying 77.88.55.66...
* Connected to yandex.ru (77.88.55.66) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none
* SSL connection using TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
* Server certificate:
* subject: CN=yandex.com.tr,ST=Russia,L=Moscow,OU=ITO,O=Yandex LLC,C=RU
* start date: май 18 20:26:24 2017 GMT
* expire date: май 18 20:26:24 2019 GMT
* common name: yandex.com.tr
* issuer: CN=Yandex CA,OU=Yandex Certification Authority,O=Yandex LLC,C=RU
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: yandex.ru
> Accept: */*
>
< HTTP/1.1 200 Ok < Date: Mon, 12 Mar 2018 01:49:47 GMT
< Content-Type: text/html; charset=UTF-8
< Cache-Control: no-cache,no-store,max-age=0,must-revalidate < Expires: Mon, 12 Mar 2018 01:49:48 GMT
< Last-Modified: Mon, 12 Mar 2018 01:49:48 GMT
< Content-Security-Policy: connect-src 'self' wss://webasr.yandex.net https://mc.webvisor.com https://mc.webvisor.org wss://push.yandex.ru wss://portal-xiva.yandex.net https://yastatic.net https://home.yastatic.net https://yandex.ru https://*.yandex.ru static.yandex.sx brotli.yastatic.net et.yastatic.net portal-xiva.yandex.net yastatic.net home.yastatic.net yandex.ru *.yandex.ru *.yandex.net yandex.st; default-src 'self' blob: wss://portal-xiva.yandex.net yastatic.net portal-xiva.yandex.net; font-src 'self' https://yastatic.net static.yandex.sx brotli.yastatic.net et.yastatic.net yastatic.net; frame-src 'self' yabrowser: data: https://ok.ru https://www.youtube.com https://player.video.yandex.net https://ya.ru https://yastatic.net https://yandex.ru https://*.yandex.ru wfarm.yandex.net yastatic.net yandex.ru *.yandex.ru awaps.yandex.net *.cdn.yandex.net; img-src 'self' data: https://yastatic.net https://home.yastatic.net https://*.yandex.ru https://*.yandex.net https://*.tns-counter.ru awaps.yandex.net *.yastatic.net gdeua.hit.gemius.pl pa.tns-ua.com mc.yandex.com mc.webvisor.com mc.webvisor.org static.yandex.sx brotli.yastatic.net et.yastatic.net yastatic.net home.yastatic.net yandex.ru *.yandex.ru *.yandex.net *.tns-counter.ru *.gemius.pl yandex.st; media-src 'self' blob: data: *.storage.yandex.net yastatic.net kiks.yandex.ru strm.yandex.ru; object-src 'self' *.yandex.net music.yandex.ru strm.yandex.ru yastatic.net kiks.yandex.ru awaps.yandex.net storage.mds.yandex.net; report-uri https://csp.yandex.net/csp?from=big.ru&showid=1520819387.59804.22888.27425&h=m17&yandexuid=2975662891520819387; script-src 'self' 'unsafe-inline' 'unsafe-eval' blob: https://suburban-widget.rasp.yandex.ru https://suburban-widget.rasp.yandex.net https://music.yandex.ru https://mc.yandex.fr https://mc.webvisor.com https://yandex.fr https://mc.webvisor.org https://yastatic.net https://home.yastatic.net https://mc.yandex.ru https://pass.yandex.ru an.yandex.ru api-maps.yandex.ru static.yandex.sx webasr.yandex.net brotli.yastatic.net et.yastatic.net yastatic.net home.yastatic.net yandex.ru www.yandex.ru mc.yandex.ru suggest.yandex.ru clck.yandex.ru awaps.yandex.net; style-src 'self' 'unsafe-inline' https://yastatic.net https://home.yastatic.net static.yandex.sx brotli.yastatic.net et.yastatic.net yastatic.net home.yastatic.net; < P3P: policyref="/w3c/p3p.xml"NON DSP ADM DEV PSD IVDo OUR IND STP PHY PRE NAV UNI"V UNIt-Cookie: yp=1523411388.ygu.1; Expires=Thu, 09-Mar-2028 01:49:47 GMT; Domain=.yandex.ru; Path=/ < Set-Cookie: mda=0; Expires=Tue, 10-Jul-2018 01:49:47 GMT; Domain=.yandex.ru; Path=/
< Set

< Set-Cookie: yandex_gid=213; Expires=Wed, 11-Apr-2018 01:49:47 GMT; Domain=.yandex.ru; Path=/
< Set-Cookie: yandexuid=2975662891520819387; Expires=Thu, 09-Mar-2028 01:49:47 GMT; Domain=.yandex.ru; Path=/
< X-Frame-Options: DENY
< Set-Cookie: i=sIckn1C7hNpXHOiRGgt0YFk7uYHKBoImjj8M41olmE0/8sSipPxp8ltAeiB5Zz66Y2osDNlYz7jmBpKL42gxwjQ4ZNQ=; Expires=Thu, 09-Mar-2028 01:49:47 GMT; Domain=.yandex.ru; Path=/; Secure; HttpOnly
< X-Content-Type-Options: nosniff
< Content-Length: 100554
<
{ [data not shown]
* Connection #0 to host yandex.ru left