Website Security Score: What It Means and How to Improve It
Security scanners assign your website a letter grade or numeric score. But what actually goes into that number? Understanding the components of a security score is the first step toward improving it. This guide breaks down every category, explains what scanners are testing, and gives you the exact steps to raise your grade from D to A.
What Is a Website Security Score?
A website security score is an automated assessment of your site's external security posture. It evaluates everything that is visible from the outside — SSL configuration, HTTP security headers, exposed files, DNS records, open ports, and reputation across threat intelligence databases. Think of it as a health checkup: it checks the most common indicators of security problems and gives you a grade.
Most scoring systems use a letter grade (A+ through F) or a numeric score (0-100). The exact methodology varies between tools, but the core categories are consistent. Our Exposure Checker evaluates all of the categories described below and generates a comprehensive score.
It is important to understand what a security score is not. It does not test for application-layer vulnerabilities like SQL injection, XSS, or business logic flaws. Those require authenticated testing and code review. A security score tests your external configuration — the low-hanging fruit that attackers check first.
Category 1: SSL/TLS Configuration (25% of Score)
SSL is the most heavily weighted category because it is the foundation of web security. A broken SSL configuration means nothing else matters — all traffic between your users and your server is potentially visible to attackers.
What scanners check
- Certificate validity: Is the certificate current and not expired? Is it issued by a trusted CA?
- Protocol versions: Does the server support only TLS 1.2 and 1.3? Or does it still accept TLS 1.0/1.1?
- Cipher suites: Does the server use strong AEAD ciphers (AES-GCM, ChaCha20-Poly1305)? Or does it still offer RC4, 3DES, or CBC ciphers?
- Certificate chain: Is the full chain present (server cert + intermediates)?
- Key strength: RSA 2048+ or ECDSA P-256+?
- OCSP Stapling: Is the server providing stapled OCSP responses?
How to improve
# Nginx: Enforce TLS 1.2+ with strong ciphers
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305;
ssl_prefer_server_ciphers off;
ssl_stapling on;
ssl_stapling_verify on;
Use our SSL Checker to verify your SSL configuration, and read the complete SSL Certificate Security Checklist for a full walkthrough.
Category 2: HTTP Security Headers (20% of Score)
Security headers instruct the browser to enable protective features. Without them, your site is vulnerable to clickjacking, MIME-type sniffing, XSS, and protocol downgrade attacks. Most websites are missing at least half of the recommended headers.
The essential security headers
# Add these to every response
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Content-Security-Policy: default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), microphone=(), geolocation=()
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Resource-Policy: same-origin
Impact of each header
- Strict-Transport-Security (HSTS): Prevents SSL stripping attacks. Without it, an attacker on the same network can intercept the first HTTP request before the redirect to HTTPS.
- Content-Security-Policy (CSP): Prevents XSS by restricting which scripts can execute. This is the single most effective header against cross-site scripting. Build one with our CSP Builder.
- X-Content-Type-Options: Prevents MIME-type sniffing, where browsers guess the content type and potentially execute uploaded files as scripts.
- X-Frame-Options: Prevents clickjacking by disabling embedding in iframes.
- Referrer-Policy: Controls how much URL information is sent to third-party sites when users click links.
- Permissions-Policy: Restricts access to browser APIs like camera, microphone, and geolocation.
Read our comprehensive Website Security Headers Guide and Content Security Policy Guide for implementation details.
Category 3: Exposed Files and Paths (20% of Score)
Attackers routinely scan for files and directories that should not be publicly accessible. These exposed paths reveal sensitive information about your technology stack, configuration, and sometimes credentials.
Common exposed paths that hurt your score
/.env— Contains database credentials, API keys, and secret keys. This single file can compromise your entire application. Read about the danger of exposed .env files./.git/— Exposes your entire repository, including commit history, source code, and potentially secrets from past commits./wp-admin/,/wp-login.php— WordPress admin panels exposed to brute force attacks./phpinfo.php— Reveals PHP version, extensions, configuration, and server paths./server-status,/server-info— Apache status pages that reveal active connections and server configuration./backup/,/db/,/sql/— Database backups that should never be web-accessible./api/swagger.json,/api/docs— API documentation that reveals all endpoints, parameters, and data models.
How to fix
# Nginx: Block sensitive paths
location ~ /\. {
deny all;
return 404;
}
location ~* ^/(backup|db|sql|logs?|tmp|temp)/ {
deny all;
return 404;
}
location = /phpinfo.php { return 404; }
location = /server-status { return 404; }
location = /server-info { return 404; }
# Apache .htaccess: Block sensitive paths
RedirectMatch 404 /\.env
RedirectMatch 404 /\.git
RedirectMatch 404 /phpinfo\.php
<DirectoryMatch "^/.*/\.(git|svn|hg)/">
Require all denied
</DirectoryMatch>
Learn more in our guide on how to find security issues on your website and run our Exposure Checker to scan for these paths automatically.
Get Your Free Security Score
Our Exposure Checker scans SSL, headers, exposed paths, open ports, DNS, and reputation in one comprehensive test. Find out your grade in seconds.
Run Free Exposure CheckCategory 4: DNS Security (15% of Score)
DNS is the foundation of your web presence, and misconfigurations here can enable email spoofing, domain hijacking, and man-in-the-middle attacks.
What scanners check
- SPF record: Specifies which mail servers can send email on behalf of your domain. Without SPF, anyone can spoof emails from your domain. Read our SPF/DKIM/DMARC Guide.
- DKIM record: Cryptographically signs outgoing emails to prove they have not been tampered with.
- DMARC record: Tells receiving servers what to do with emails that fail SPF/DKIM checks (quarantine, reject, or do nothing).
- CAA records: Restrict which Certificate Authorities can issue SSL certificates for your domain.
- DNSSEC: Cryptographically signs DNS responses to prevent DNS spoofing and cache poisoning.
- Dangling CNAMEs: DNS records pointing to services you no longer use, enabling subdomain takeover attacks.
How to improve
# Essential DNS records for security
# SPF - restrict who can send email as your domain
example.com. TXT "v=spf1 include:_spf.google.com ~all"
# DMARC - enforce email authentication
_dmarc.example.com. TXT "v=DMARC1; p=reject; rua=mailto:dmarc@example.com"
# CAA - restrict certificate issuance
example.com. CAA 0 issue "letsencrypt.org"
example.com. CAA 0 iodef "mailto:security@example.com"
Use our DNS Lookup tool to check your current DNS records and our Whois Lookup to verify domain registration details.
Category 5: Open Ports and Services (10% of Score)
Every open port is a potential entry point for attackers. Scanners check for exposed database ports, admin interfaces, and unnecessary services that should not be reachable from the internet.
Ports that should not be publicly accessible
- 3306 (MySQL) — Database should only accept connections from the application server, not the internet.
- 5432 (PostgreSQL) — Same as MySQL. Bind to localhost or use firewall rules.
- 6379 (Redis) — Redis has no authentication by default. An exposed Redis is a complete compromise.
- 9200 (Elasticsearch) — Default Elasticsearch has no auth. Entire databases get exposed.
- 27017 (MongoDB) — Thousands of MongoDB instances have been ransomed due to public exposure.
- 22 (SSH) — Not inherently dangerous, but brute force attacks are constant. Use key-based auth and consider changing the port or restricting by IP.
Use our Port Lookup to understand what each port number is used for. Read our detailed guide on open port security risks for remediation steps.
Category 6: Reputation and Blacklists (10% of Score)
If your IP address or domain appears on security blacklists, it means your site has been associated with malicious activity — either because it was actually compromised, or because a previous owner of the IP address was malicious.
What gets you blacklisted
- Hosting malware or phishing pages (even unknowingly, via a compromised plugin)
- Sending spam email from your server
- Being part of a botnet (if your server was compromised)
- Shared hosting — another site on the same IP may be blacklisted
How to check and fix
Check your IP against common blacklists: Spamhaus, SURBL, Google Safe Browsing, PhishTank, and VirusTotal. If you are listed, remediate the underlying issue (remove malware, fix the vulnerability that was exploited, clean up spam) and then request removal from each blacklist. Use our IP Lookup tool to check your IP reputation.
Score Ranges and What They Mean
- A+ (95-100): Excellent. Full SSL with TLS 1.3, all security headers present, no exposed paths, clean DNS, no open ports, clean reputation. This is the standard to aim for.
- A (85-94): Very good. Minor issues like a missing Permissions-Policy header or OCSP stapling not enabled. Easy fixes.
- B (70-84): Good with notable gaps. Typically missing several security headers or has minor SSL issues. Fix these before an attacker finds them.
- C (55-69): Mediocre. Significant security gaps. May be missing HSTS, have TLS 1.0 enabled, or have exposed sensitive paths. Remediate urgently.
- D (40-54): Poor. Multiple serious issues. Likely has expired certificates, exposed .env files, open database ports, or no security headers at all.
- F (0-39): Failing. Critical vulnerabilities that likely mean the site is already compromised or trivially exploitable. Drop everything and fix this immediately.
Quick Wins to Improve Your Score Immediately
If your score is below B, here are the changes that have the highest impact for the least effort:
- Add security headers. A single Nginx config block or Cloudflare Transform Rule can add all six essential headers in five minutes. See our Security Headers Guide.
- Fix SSL configuration. Disable TLS 1.0/1.1 and weak ciphers. This is a two-line config change. Use our SSL Checker to verify.
- Block sensitive paths. Add deny rules for
/.env,/.git,/phpinfo.php, and/server-status. - Add SPF, DKIM, and DMARC records. Prevents email spoofing. Use our DNS Lookup to check your current records.
- Close unnecessary ports. Use firewall rules (security groups in AWS, iptables/nftables on bare metal) to restrict access to ports 80 and 443 only.
Frequently Asked Questions
Does a high security score mean my site is unhackable?
No. A security score measures your external configuration, not your application code. You could have a perfect A+ score and still be vulnerable to SQL injection, authentication bypasses, or business logic flaws. A security score catches the most common and easily exploitable issues. For comprehensive security, you also need code review, penetration testing, and regular vulnerability assessments.
How often should I check my security score?
Monthly at minimum, and after every deployment or infrastructure change. SSL certificates expire, developers add new endpoints, and DNS records change. What was secure last month may not be secure today. Set up automated monitoring if your tools support it. Our Exposure Checker can be run as often as you like at no cost.
Why does my score differ between security scanners?
Different scanners weigh categories differently, test different things, and have different scoring scales. Some focus heavily on SSL, others emphasize headers, and some include reputation data that others ignore. The important thing is not the exact number but the issues identified. Use the scan results as a checklist of things to fix rather than obsessing over the letter grade.
Can Cloudflare improve my security score?
Yes, significantly. Cloudflare can add security headers via Transform Rules, enforce HTTPS via Always Use HTTPS, enable HSTS, provide a WAF, and handle SSL termination with strong TLS configuration. If you are on Cloudflare and still have a low score, the issue is likely in your origin server configuration (headers set on origin override Cloudflare headers) or exposed paths that Cloudflare does not block by default.
Find Out Your Score Now
Stop guessing about your security posture. Our Exposure Checker scans everything in this guide and gives you a clear, actionable report with your score and specific fixes.
Run Free Exposure CheckThe Bottom Line
A website security score is not a vanity metric — it is a practical checklist of the most common and easily exploitable security gaps. Focus on the high-impact categories first: SSL configuration, security headers, and exposed paths. These three alone account for 65% of most security scores and can be fixed in under an hour. Then address DNS security, close unnecessary ports, and monitor your reputation. Run a scan monthly, after every deployment, and any time you change infrastructure.
Related tools and articles: Exposure Checker, SSL Checker, CSP Builder, DNS Lookup, Port Lookup, Security Headers Guide, Free Website Security Scan, Finding Security Issues, and 70+ more free tools.