HTTPS and security headers: what matters for SEO
HTTPS is table stakes. The headers that sit beside it are about protecting visitors, and it is worth being clear which is which.
Google lists HTTPS as part of page experience, so every page should be served securely, with HTTP redirected to HTTPS. Security headers such as HSTS, Content-Security-Policy and X-Frame-Options protect visitors from attacks but are not ranking factors. They matter for SEO indirectly: a hacked site loses rankings fast.
Google's page experience page asks site owners to check whether their pages are served over HTTPS, alongside Core Web Vitals and mobile friendliness. It also says that, beyond Core Web Vitals, other page experience aspects do not directly help a site rank higher. So HTTPS is expected, and its absence is a problem, but adding more security on top is not a ranking lever. That is the honest framing for this item on our technical SEO checklist.
HTTPS, done properly
- A valid certificate on every host name you use, including www if it exists.
- Every HTTP address redirected to HTTPS with a single permanent redirect; see redirect chains.
- No mixed content: images, scripts and fonts loaded over HTTPS too.
- Canonicals, sitemaps and internal links using the HTTPS address.
The security headers, and what each does
| Header | Protects against | SEO effect |
|---|---|---|
| Strict-Transport-Security (HSTS) | Downgrade to HTTP on later visits | None directly; removes an HTTP hop for returning visitors |
| Content-Security-Policy | Injected scripts (cross-site scripting) | None directly; can break analytics if written too tightly |
| X-Frame-Options / frame-ancestors | Your pages framed by other sites (clickjacking) | None |
| X-Content-Type-Options: nosniff | Browsers guessing file types | None |
| Referrer-Policy | Leaking full URLs to other sites | None, but affects what referral data other sites see |
MDN's HSTS page notes that a max-age of one year is the minimum accepted for the browser preload lists, and that the preload directive is needed for inclusion. Preloading is hard to undo, so add it only when every subdomain is permanently on HTTPS.
Why security still matters for search
Google's spam policies cover hacked content: pages or links injected into a compromised site. A hacked site can show spam in search results under your name, and recovering takes time. Headers such as a Content-Security-Policy make the most common injection attacks harder. That is the indirect link between security and SEO, and it is a strong one.
What we serve on colleviate.com
We read our own response headers on 5 December 2026. Every page is HTTPS; HTTP redirects to HTTPS in one hop for the bare domain (the www variant has a two-hop chain, noted in our redirect article). We send HSTS with a one-year max-age, includeSubDomains and preload; a Content-Security-Policy that allows only our own files, Google Fonts and the Google tags we use; X-Frame-Options DENY with frame-ancestors none; nosniff; a strict-origin-when-cross-origin referrer policy; and a Permissions-Policy that switches off camera, microphone, location and payment features we do not use. The policy has one cost worth knowing: an analytics or advertising tag that is not on the allow list is blocked until the policy is updated, which is why our GA4 setup guide says to test tags with the browser console open.
Sources
- Understanding page experience in Google Search results, Google Search Central, undated
- Strict-Transport-Security header, MDN Web Docs, undated
- Content Security Policy (CSP), MDN Web Docs, undated
- Spam policies for Google web search, Google Search Central, undated
- Colleviate technical check of colleviate.com (site build and live HTTP responses), Colleviate, 5 Dec 2026
Questions we get asked
Is HTTPS a ranking factor?
Google lists HTTPS as part of page experience. Serve every page securely; it is expected rather than a boost.
Do security headers improve SEO?
Not directly. They protect visitors and make hacking harder, and a hacked site can lose rankings.
What is HSTS?
A header telling browsers to use HTTPS for your domain on future visits. MDN notes a one-year max-age is the minimum for preloading.
Can a Content-Security-Policy break analytics?
Yes. Tags not on the policy's allow list are blocked, so test new tags with the browser console open.
Not sure what your server sends?
We read your headers, fix the gaps and make sure your tags still fire.
Ask for a scoped auditWhat we do · How we produce it · Who we do it for · Talk to us