What is a website security audit?
A website security audit reviews the protections a site offers every visitor: whether the connection is encrypted, whether the site tells browsers to block common attacks, how it handles cookies, and whether its domain and email are protected against impersonation.
This tool runs a passive audit. It only looks at what any browser can already see: the response headers, cookies and HTML of one page, the site’s certificate, and its public DNS records. It needs no access to your server and never probes for hidden files, so it is safe to run on any public website. Think of it as a quick health check, not a penetration test.
What does this tool check?
The audit runs 18 checks in four areas, worth 100 points in total.
- Secure connection (40 points): a working HTTPS certificate, a redirect from http:// to https://, the Strict-Transport-Security (HSTS) header, whether the domain is on browsers’ HSTS preload list, and how many days the certificate has left.
- Browser protections (35 points): Content-Security-Policy (and whether it is weakened by
'unsafe-inline','unsafe-eval'or wildcards), clickjacking protection (frame-ancestorsor X-Frame-Options), X-Content-Type-Options, Referrer-Policy and Permissions-Policy. - Cookies & page content (15 points): the Secure, HttpOnly and SameSite flags on every cookie, server software versions leaking in headers, and mixed content (scripts, styles, frames, forms or images loaded over http:// on an HTTPS page).
- Email & domain (10 points): DNSSEC, SPF, DMARC and CAA records.
It also looks for a /.well-known/security.txt file, which tells security researchers how to contact you. That is reported but not scored. Requests are made from Cloudflare’s network, and the first 1 MB of the page’s HTML is scanned for mixed content.
How to interpret your security score
Each check earns its full points when it passes, half when it shows a warning, and none when it fails. Checks that don’t apply (for example, the certificate check when HTTPS doesn’t work at all) are left out, and the score is scaled back to 100.
| Grade | Score | What it means |
|---|---|---|
| A+ | 95–100 | Excellent: follows current best practice. |
| A | 85–94 | Strong: only small improvements left. |
| B | 70–84 | Good: solid basics, a few protections missing. |
| C | 55–69 | Fair: several important protections are missing. |
| D | 40–54 | Weak: visitors are exposed to common attacks. |
| F | 0–39 | At risk: serious problems to fix first. |
A site whose HTTPS doesn’t work is capped at 39 (grade F), whatever else it gets right, because without encryption the other protections can be stripped in transit.
In the summary view, each area gets a traffic light: Good means it earned at least 85% of its points, Needs attention 60–84%, and At risk below 60%. Items marked Fix now are failures; Recommended items are warnings worth half their points.
A high score means the site’s visible configuration is sound. It does not prove the site’s code is free of vulnerabilities such as SQL injection, broken logins or outdated plugins. Those need a code review or a penetration test.
How to fix common website security issues
Most issues are fixed by adding a response header or a DNS record. On Cloudflare Pages, headers go in a public/_headers file; for any site behind Cloudflare, use Rules → Transform Rules → Modify response header. The technical view of the audit generates a _headers file with just the headers you’re missing.
No HSTS
Tell browsers to use HTTPS only. On Cloudflare, turn it on under SSL/TLS → Edge Certificates → HSTS. Add includeSubDomains only once every subdomain supports HTTPS.
Strict-Transport-Security: max-age=31536000
No Content-Security-Policy
A CSP stops injected scripts from running. Start in report-only mode so nothing breaks, list the domains your scripts really come from (analytics, ads, embeds), then switch the header name to Content-Security-Policy.
Content-Security-Policy-Report-Only: default-src 'self'; script-src 'self' https://www.googletagmanager.com; object-src 'none'; base-uri 'self'; frame-ancestors 'self'
Clickjacking
Content-Security-Policy: frame-ancestors 'self'
X-Frame-Options: SAMEORIGIN
Missing smaller headers
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), microphone=(), geolocation=()
Insecure cookies
Every cookie should carry Secure; session and login cookies also need HttpOnly; and SameSite=Lax blocks most cross-site request forgery. Change this where your application or framework sets the cookie.
Mixed content
Change http:// links to images, scripts and styles to https://. As a stopgap, ask browsers to upgrade them automatically:
Content-Security-Policy: upgrade-insecure-requests
No DNSSEC
On Cloudflare DNS, open DNS → Settings, enable DNSSEC, and add the DS record it shows at your domain registrar.
Weak email protection (SPF and DMARC)
Publish one SPF record that lists your mail providers, then a DMARC record. Start DMARC at p=none with a report address, and move to quarantine and then reject once the reports show your real mail passing.
example.com. TXT "v=spf1 include:_spf.google.com ~all"
_dmarc.example.com. TXT "v=DMARC1; p=quarantine; rua=mailto:[email protected]"
No CAA record
List the certificate authorities you use, so no one else can issue a certificate for your domain. Behind Cloudflare, include the authorities its Universal SSL uses.
example.com. CAA 0 issue "letsencrypt.org"
example.com. CAA 0 issue "pki.goog"