Es gibt viele Online-Tools, mit denen Sie die Kopfzeilen Ihrer Website testen können. Aber es gibt eine einfache Möglichkeit, die Header für eine Seite mit einem lokalen Tool zu überprüfen – cURL . cURL (Client URL) ist ein Tool zum Übertragen von Informationen über verschiedene Protokolle.
In unserem Fall verwenden wir es, um die Header für eine bestimmte Site zu erhalten. Der Befehl lautet:
# curl -L -I domain.com
-L, --location - cURL will follow any redirections
-I, --head - cURL will get only the headers of the document
Ein Beispiel für unseren Domainnamen ist unten dargestellt. Sie sehen, dass das Tool nur die Header erhält und auch der Umleitung von plothost.com zu https://www.plothost.com
folgtroot@web [~]# curl -L -I plothost.com
HTTP/1.1 301 Moved Permanently
Date: Wed, 13 May 2020 17:14:14 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
Location: https://www.plothost.com/
Cache-Control: max-age=3600
Expires: Wed, 13 May 2020 18:14:14 GMT
Content-Type: text/html; charset=iso-8859-1
HTTP/1.1 200 OK
Date: Wed, 13 May 2020 17:14:15 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
Last-Modified: Wed, 13 May 2020 16:43:54 GMT
ETag: "be9b-5a58a49253bdc"
Accept-Ranges: bytes
Content-Length: 48795
Cache-Control: max-age=10800, must-revalidate, public
Expires: Wed, 13 May 2020 17:43:54 GMT
Vary: Accept-Encoding,Cookie
Connection: keep-alive
Set-Cookie: HttpOnly;Secure
X-XSS-Protection: 1; mode=block
Referrer-Policy: no-referrer-when-downgrade
Expect-CT: enforce;max-age=30; report-uri https://plothost.report-uri.io/r/default/ct/enforce
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
X-Content-Type-Options: nosniff
Feature-Policy: accelerometer none;ambient-light-sensor none;autoplay none;camera none;geolocation none;gyroscope none;magnetometer none;microphone none;midi none;usb none;vibrate none;wake-lock none;xr-spatial-tracking none
Access-Control-Allow-Origin: *
Pragma: public
Content-Type: text/html; charset=UTF-8
root@web [~]#
Ressourcen:
cURL-Manpage