What are HTTP Headers?
HTTP headers are metadata key-value pairs sent between a browser or crawler and a web server. The request headers describe what the client wants; the response headers describe what the server is sending back and how it should be handled. This tool fetches the response headers for any URL and analyses them for security best practices.
Redirect Chains
A redirect chain occurs when a URL returns a 3xx response pointing to another URL, which may itself redirect, and so on. Long chains add latency and can cause issues for search engine crawlers. This tool follows each hop, records the IP address, and displays the full chain so you can spot unnecessary redirects or HTTP-to-HTTPS misconfigurations.
Security Headers
- Strict-Transport-Security: Tells browsers to use HTTPS only, preventing protocol downgrade attacks.
- Content-Security-Policy: Restricts which resources (scripts, styles, images) the page may load, mitigating XSS.
- X-Frame-Options: Prevents the page from being embedded in a frame on another origin, blocking clickjacking.
- X-Content-Type-Options: Stops browsers from MIME-sniffing a response away from its declared content type.
- Referrer-Policy: Controls how much referrer information is sent when navigating to other sites.
- Permissions-Policy: Disables browser APIs (camera, geolocation, microphone) the page does not need.
CDN Detection
Content Delivery Networks add their own proprietary headers to responses. Cloudflare sends cf-ray and cf-cache-status; AWS CloudFront sends x-amz-cf-id; Varnish sends x-varnish. This tool checks for over a dozen CDN signatures to identify which provider, if any, is in front of the server. The full list of standard HTTP header field names is documented on MDN Web Docs.
Related tools
- Check whether the SSL certificate is valid before auditing HSTS with the SSL checker.
- Look up the server IP shown in the redirect chain with the IP lookup.
- Identify the hosting provider and CDN for a domain with the hosting checker.
How the HTTP Headers Tool Works
The tool follows the full redirect chain for the submitted URL, hop by hop. At each step it resolves the URL's hostname to an IP address and checks whether the IP falls within private RFC 1918 ranges (10.x.x.x, 172.16-31.x.x, 192.168.x.x) before connecting. This prevents server-side request forgery (SSRF) attacks where a user could submit an internal URL to probe the server's local network.
For each hop, the tool records the status code, the destination URL, the server IP, and the full set of response headers. After following the chain, it grades the final response against six security headers: Strict-Transport-Security, Content-Security-Policy, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, and Permissions-Policy. Missing headers are flagged with a recommended value.
Common Use Cases
- Diagnosing redirect loops and misconfigured rewrites: HTTP-to-HTTPS redirects that also contain www-to-non-www redirects can create redirect chains of 3 or more hops. The tool shows each hop's status code and URL, making it straightforward to identify where an unnecessary redirect can be collapsed.
- Auditing security headers before a launch: Before deploying a new application, running an HTTP headers check confirms that the production server includes all six recommended security headers. A missing Content-Security-Policy or Permissions-Policy is a common pre-launch finding that is straightforward to add at the web server or CDN layer.
- Verifying cache-control and CDN behaviour: CDN providers add proprietary headers that reveal cache status. Cloudflare's
CF-Cache-Statusheader shows whether a response was served from cache (HIT) or the origin (MISS). Checking these headers confirms whether caching is working as configured and helps diagnose stale content issues. - Confirming HSTS is set correctly: HSTS (HTTP Strict Transport Security) tells browsers to use HTTPS exclusively for a domain for the duration specified in the
max-agedirective. A common misconfiguration is settingmax-age=0to disable HSTS without removing the header, or omitting theincludeSubDomainsdirective when it is required. - Identifying the web server and version: The
Serverheader often discloses the web server software and version (e.g.nginx/1.25.3orApache/2.4.57). Security-conscious deployments suppress this header to avoid advertising the software version to attackers. The tool surfaces this header so it can be identified and removed if necessary.
Standards and Further Reading
HTTP/1.1 response headers are defined in RFC 9110. The HSTS specification is in RFC 6797. OWASP publishes Secure Headers Project recommendations for all security headers. MDN Web Docs provides the complete reference for HTTP header fields.
Frequently Asked Questions
What are HTTP headers?
HTTP headers are key-value pairs exchanged between a web browser (or any HTTP client) and a server as part of every request and response. Response headers carry information such as the content type, caching instructions, security policies, and redirect targets. They are invisible to the visitor but define how browsers handle a page's content and security.
What security headers does HostChecker check?
HostChecker grades responses against six security headers: Strict-Transport-Security (HSTS), Content-Security-Policy (CSP), X-Frame-Options, X-Content-Type-Options, Referrer-Policy, and Permissions-Policy. Missing headers are highlighted, as each one mitigates a specific class of attack such as clickjacking, XSS, or MIME-sniffing.
What is a redirect chain and why does it matter?
A redirect chain is the sequence of HTTP redirects (301, 302, 307, 308) a browser follows before reaching the final URL. HostChecker follows the entire chain and shows each hop's status code, destination URL, and server IP. Long redirect chains add latency to every page load. Chains that loop or exceed the browser's redirect limit (usually 20 hops) prevent the page from loading entirely.
What is Content-Security-Policy and why is it important?
Content-Security-Policy (CSP) is a header that tells browsers which sources are allowed to load scripts, styles, images, and other resources on a page. A well-configured CSP prevents cross-site scripting (XSS) attacks by blocking injected scripts from executing. It is one of the most effective browser-enforced security controls available to web developers.
What does the X-Frame-Options header do?
The X-Frame-Options header controls whether a page can be embedded in a <frame>, <iframe>, or <object>. Setting it to DENY or SAMEORIGIN prevents clickjacking attacks, where a malicious page embeds the target site invisibly and tricks users into clicking on it. The newer frame-ancestors directive in CSP provides more granular control.
How can I identify if a site uses a CDN from its headers?
CDN providers add or modify several response headers. Cloudflare adds a CF-Ray header. Fastly adds X-Served-By. Varnish adds X-Varnish. The Via and X-Cache headers often identify the caching layer. The Server header may also reveal the CDN or web server software (e.g. cloudflare, AmazonS3, nginx).
What is the difference between a 301 and 302 redirect?
A 301 (Moved Permanently) redirect tells browsers and search engines that the resource has permanently moved to the new URL. The browser caches this redirect and goes directly to the new URL in future. A 302 (Found) redirect is temporary; browsers do not cache it and always check the original URL first. For SEO purposes, permanent moves should use 301 redirects to pass link equity to the new URL.