Security
Check Your Website’s Security Basics in 2 Minutes (and Fix Them)
Check HTTPS, certificate expiry, security headers, version leaks and the WordPress user list in 2 minutes, then fix what you find in a safe order.
Automated scanners crawl the web all day looking for easy targets: an expired certificate, an old WordPress version in the page source, a list of usernames anyone can download. You can see most of those signs yourself in a couple of minutes, from the outside, the same way a scanner does. This guide shows what to check, what the results mean and a fix order that won’t break your site.
Summary: what to do
- Run a quick outside check with our free website security check. It reads your public home page and gives an A to D grade.
- Make a backup you can restore before you change anything.
- Update WordPress, themes, plugins and PHP, and delete what you don’t use.
- Lock down admin accounts with unique passwords and two-step verification.
- Fix HTTPS: automatic certificate renewal, a permanent redirect from http:// to https:// and no mixed content.
- Add the simple security headers, hide software versions and stop the public user list.
- Turn on HSTS carefully, then test a Content-Security-Policy in report-only mode before enforcing it.
What the 2-minute check looks at
Type your domain into the website check. It loads your home page over HTTPS, as a visitor would, and reads the response headers and page source. It also requests the http:// version once to see whether it redirects, reads your certificate’s expiry date and, on WordPress sites, asks the public users endpoint whether it lists accounts. It doesn’t log in, crawl other pages or probe for vulnerabilities.
The score starts at 100 and loses points for each problem:
- HTTPS doesn’t work or the certificate is invalid: 45 points.
- Certificate expired: 40 points; expiring within 14 days: 15 points.
- No redirect from http:// to https://: 10 points.
- No HSTS header: 8 points.
- No X-Frame-Options and no CSP
frame-ancestors: 5 points. - No
X-Content-Type-Options: nosniff: 4 points. - An end-of-life PHP version shown in
X-Powered-By: 15 points. - An outdated WordPress version shown in the page source: 10 points.
- WordPress usernames listed at
/wp-json/wp/v2/users: 12 points. - Mixed content (scripts, styles, frames or images loaded over http://): 8 points.
A missing Content-Security-Policy or Referrer-Policy, and a version number in the Server header, appear as notes but cost no points. 90 or more is an A, 75 or more a B, 55 or more a C, and lower is a D. The tool doesn’t check Permissions-Policy, so look for that one yourself.
HTTPS, redirects and certificate expiry
Without HTTPS, browsers label your page “Not secure”, and anyone on the same public Wi-Fi can read or change form entries and logins. Three things have to be right:
- A valid certificate for your exact domain, with and without
wwwif you use both. - A permanent redirect (301 or 308) from every http:// address to its https:// version.
- Automatic renewal. Renewal can silently fail after a DNS or hosting change, and an expired certificate shows visitors a full-page warning. If the check says yours expires within two weeks, confirm renewal in your hosting panel.
If the check reports mixed content, find the old http:// links in your theme, page builder or media library and change them to https://.
Security headers in plain words
Security headers are short lines your server sends with every page; browsers follow them. Set them in your hosting panel, your CDN’s response header settings, an .htaccess file on Apache, the nginx config or a WordPress security plugin.
| Header | What it does | Typical value |
|---|---|---|
Strict-Transport-Security (HSTS) |
Tells browsers to use HTTPS only for your site | max-age=31536000; includeSubDomains |
Content-Security-Policy |
Lists where scripts, styles and other resources may load from | Site-specific; start in report-only mode |
X-Content-Type-Options |
Stops browsers from guessing file types | nosniff |
X-Frame-Options or CSP frame-ancestors |
Stops other sites from embedding your pages in a frame | SAMEORIGIN or frame-ancestors 'self' |
Referrer-Policy |
Limits how much of your page address is passed to other sites | strict-origin-when-cross-origin |
Permissions-Policy |
Turns off browser features your site doesn’t use | geolocation=(), camera=(), microphone=() |
HSTS
A redirect still leaves the first http:// request open to interception. HSTS closes that gap for returning visitors: once a browser has seen the header over HTTPS, it upgrades later http:// requests itself and won’t let users click through certificate errors. MDN notes that browsers ignore the header over plain HTTP. Because the rule is remembered for the whole max-age, a mistake can lock visitors out until it expires. Add includeSubDomains only when every subdomain works over HTTPS, and treat preload as a later, deliberate step.
Content-Security-Policy, as an overview
A CSP tells the browser where it may load scripts, styles, images and frames from. If someone injects a malicious script into your page, a good policy can stop it from running. The catch: WordPress sites load code from many places, such as analytics, chat widgets, payment forms and embedded video, and a rushed policy breaks them. Start with Content-Security-Policy-Report-Only, which MDN describes as reporting violations without blocking anything, and enforce only once the reports are clean.
X-Content-Type-Options and frame protection
nosniff makes the browser trust the file type your server declares, so a file uploaded as plain text can’t be run as a script. Frame protection stops clickjacking, where another site loads your page in an invisible frame and tricks visitors into clicking on it. X-Frame-Options only works as a real HTTP header, not as an HTML meta tag. The CSP frame-ancestors directive does the same job with more options, and the OWASP HTTP Headers Cheat Sheet recommends it where possible. Sending both is fine.
Referrer-Policy and Permissions-Policy
When a visitor follows a link to another site, the browser may send the address they came from. Modern browsers default to strict-origin-when-cross-origin, which sends only your domain, but OWASP recommends setting it explicitly. Permissions-Policy switches off features such as location, camera and microphone for your pages and embedded frames. MDN marks it as limited availability, so treat it as a useful extra.
On Apache with mod_headers enabled:
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
Header always set X-Content-Type-Options "nosniff"
Header always set X-Frame-Options "SAMEORIGIN"
Header always set Referrer-Policy "strict-origin-when-cross-origin"
Header always set Permissions-Policy "geolocation=(), camera=(), microphone=()"
On nginx, inside the HTTPS server block:
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Permissions-Policy "geolocation=(), camera=(), microphone=()" always;
Server and version leaks
Headers such as Server: Apache/2.4.58 or X-Powered-By: PHP/8.1.2, and a WordPress generator tag in the page source, tell scanners exactly which software you run. Hiding versions isn’t real protection, since old software stays vulnerable either way, but it removes an easy signpost. OWASP recommends removing X-Powered-By and making Server non-informative:
# php.ini
expose_php = Off
# nginx
server_tokens off;
# Apache (main server config)
ServerTokens Prod
ServerSignature Off
# WordPress theme functions.php: remove the generator tag
remove_action('wp_head', 'wp_generator');
If the leaked version is old, upgrading matters far more than hiding it. Compare yours with PHP’s supported versions page and ask your host to move you to a supported one.
The WordPress user list at /wp-json/wp/v2/users
The WordPress REST API’s users route, documented in the REST API users reference, returns each user’s display name and slug. On a default install it answers anyone and lists the people who have published posts. The slug is often the same as the login name, so an attacker gets half of every login for free.
Open https://yourdomain.com/wp-json/wp/v2/users in a private window. If you see names, restrict it, either with a security plugin setting or a snippet that removes the route for visitors who aren’t logged in, so the editor still works for your team:
add_filter('rest_endpoints', function ($endpoints) {
if (!is_user_logged_in()) {
unset($endpoints['/wp/v2/users']);
unset($endpoints['/wp/v2/users/(?P<id>[\d]+)']);
}
return $endpoints;
});
Author archive pages can reveal the same names, so the real fix is in the next section: logins that are useless without a strong password and a second factor.
Updates, accounts and backups
The WordPress hardening guide says plainly that older versions are not maintained with security updates. Keep core, themes and plugins current, turn on automatic updates where your site can handle them, and delete plugins and themes you don’t use. The same guide recommends strong, unique passwords, two-step verification and avoiding usernames such as admin.
Backups are your undo button. The UK NCSC’s guide to backing up your data lists your website among the things a business needs a copy of, and says to know how to restore. For a website, that means the database and the files, stored outside your hosting account, plus a restore you have tried at least once.
What an outside check can’t see
A good grade means your public signals look healthy, not that the site is clean. An outside check can’t see:
- Malware already on the server, such as hidden spam pages, scripts shown only to search engines or backdoor files.
- Vulnerable plugins and themes, unless they reveal themselves. Compare your plugin list with a vulnerability feed, through a security plugin or your host.
- Weak or reused admin passwords, missing two-step verification and old accounts for former staff or agencies.
- Hosting settings, such as file permissions, who has FTP or control panel access and whether backups actually run.
A safe order to fix things
- Back up files and database, and store the copy away from your host.
- Update WordPress core, plugins, themes and PHP. Remove anything unused.
- Secure accounts: remove old users, set unique passwords, turn on two-step verification for every admin.
- Fix HTTPS: confirm automatic renewal, add the 301 redirect and clear mixed content.
- Add the low-risk headers (
nosniff, frame protection, Referrer-Policy, Permissions-Policy), hide versions and restrict the users endpoint. - Turn on HSTS with a short
max-agesuch as one day (86400), check every page and subdomain, then raise it to a year. - Test a Content-Security-Policy in report-only mode and enforce it later.
- Run the check again after each change and once a month.
After each step, test your home page, forms and checkout. Your email setup deserves the same two minutes: the email domain check reads your SPF, DKIM and DMARC records, and our SPF, DKIM and DMARC guide explains the fixes.
FAQ
Is a website check the same as a security scan?
No. It reads what any browser can see on your home page. A vulnerability scan or penetration test goes much deeper and should only be run with the owner’s permission.
Can adding security headers break my site?
nosniff, Referrer-Policy and Permissions-Policy are low risk. Frame protection can break legitimate embeds of your pages, HSTS can lock visitors out if HTTPS fails, and an enforced CSP can block scripts you need. Roll those out step by step.
How often should I check?
After every hosting, CDN, theme or plugin change, and at least monthly. If you’d rather have updates, backups and checks run on a schedule, that is the kind of routine our automation work sets up.
How this article was made: this is our own guide, based on MDN’s header documentation, the OWASP HTTP Headers Cheat Sheet, the WordPress REST API and hardening documentation, PHP’s supported versions page and the NCSC’s guidance for small organizations, all linked above. The scoring described matches how our website check works today. Header values are common starting points, so test them on your own site before you rely on them.
Sources
- MDN: Strict-Transport-Security header
- MDN: Content-Security-Policy header
- MDN: X-Content-Type-Options header
- MDN: X-Frame-Options header
- MDN: Referrer-Policy header
- MDN: Permissions-Policy header
- OWASP Cheat Sheet Series: HTTP Security Response Headers Cheat Sheet
- WordPress REST API Handbook: Users
- WordPress Advanced Administration Handbook: Hardening WordPress
- PHP: Supported Versions
- NCSC: Small organisations guide to cyber security, Backing up your data
Written by the CTRL ALT AI team with AI assistance and edited by a person.