SSL & Security Headers 101: Moving Beyond Just HTTPS on Client Websites
A common misconception among web designers and junior developers is that security is a solved problem the moment Let's Encrypt provisions a free TLS certificate and Chrome displays a padlock icon next to the URL. In reality, having a valid SSL certificate only encrypts the transit pipe between the visitor's device and your server; it does almost nothing to prevent modern browser-level exploits like clickjacking, MIME-type sniffing, or man-in-the-middle protocol downgrades.
In this article, we explain why modern client websites require defensive HTTP security headers, how each header works, and how to verify them before handoff.
1. The Problem with Naive HTTPS: SSL Stripping Attacks
When a prospective customer types a client's web address into their browser address bar (for example, typing clientsite.com), the browser defaults to sending an unencrypted HTTP request: http://clientsite.com.
Your server may immediately issue a 301 redirect to https://clientsite.com. However, during that initial unencrypted round-trip, an attacker on a public Wi-Fi network (such as at an airport, cafe, or hotel) can intercept the response, strip the redirect, and keep the user on unencrypted HTTP. This attack, known as SSL Stripping, allows adversaries to view form inputs, contact details, and session cookies in plain text.
The Fix: HTTP Strict Transport Security (HSTS)
HTTP Strict Transport Security (HSTS) solves this vulnerability completely. By returning the header:
Strict-Transport-Security: max-age=31536000; includeSubDomains
You instruct the visitor's browser to permanently cache an internal rule: for the next 365 days (31,536,000 seconds), the browser will never attempt an unencrypted HTTP connection to this domain or any of its subdomains, automatically converting every request to HTTPS locally before it ever touches the network.
2. Defending Against Clickjacking: X-Frame-Options & CSP
Clickjacking occurs when an attacker embeds your client's website inside an invisible, transparent <iframe> positioned directly on top of an enticing decoy button (like “Click here to claim your reward”). When the victim clicks the decoy button, they are actually clicking a hidden button on your client's site—potentially submitting an inquiry, triggering an action, or interacting with authenticated controls.
To stop third-party domains from embedding your client's website in an iframe, send the header:
X-Frame-Options: SAMEORIGIN
Or better yet, use modern Content Security Policy directives:
Content-Security-Policy: frame-ancestors 'self';
This ensures that only your client's own domain can embed its pages in a frame.
3. Stopping MIME-Type Sniffing: X-Content-Type-Options
Web browsers historically attempted to “sniff” file contents if the web server sent a missing or misconfigured Content-Type header. For instance, if an attacker uploaded a malicious JavaScript payload disguised as an image (avatar.jpg), an older browser might ignore the image MIME type, execute the JavaScript file, and compromise the session.
Sending this simple header tells the browser to strictly honor the declared MIME type and refuse to execute non-script files:
X-Content-Type-Options: nosniff
4. Preventing Query Leakage: Referrer-Policy
When a visitor clicks an external outbound link on your client's site, their browser sends a Referer header indicating the exact page they came from. If your client's URL contains sensitive query parameters (such as ?user_id=123 or ?order_token=xyz), that private state can leak to external third parties.
Setting a balanced referrer policy protects visitor privacy:
Referrer-Policy: strict-origin-when-cross-origin
How to Configure These Headers Easily
Configuring security headers does not require hours of complex DevOps work:
- Cloudflare: Enable HSTS with one toggle under SSL/TLS > Edge Certificates, and use Transform Rules to inject response headers.
- Next.js: Define an
async headers()function innext.config.js. - WordPress / Apache: Add
Header setdirectives in your root.htaccessfile. - Webflow: Route your domain through Cloudflare proxy to inject enterprise security headers.
Conclusion
A client site with properly configured security headers earns top-tier security grades, avoids browser warnings, and shields client user interactions from day one. Run your domain through Nyrolo's free Security Headers Scanner to verify your score before launch.
Scan your client's security headers now
Test HSTS, CSP, and X-Frame-Options in seconds with our free standalone scanner.
Test Free Security Headers Tool