/ โ† Learning Hub / Security Audit Fixes
On this page
  1. What the audit looks at
  2. Choosing where to make the fix
  3. The fix guides
  4. Managed and hosted platforms
  5. Mail DNS records and security.txt
  6. Which findings to fix first
  7. Order of work
  8. Questions and answers

What the audit looks at

The checks cover things any visitor's browser can observe, so they are a fair picture of what your site exposes to the world. The table below summarises each area and what a healthy result usually looks like. Exact values depend on your site, so treat these as common starting points rather than rules.

AreaWhat it protects againstTypical healthy setting
Strict-Transport-Security (HSTS)Downgrade to unencrypted HTTPmax-age=31536000; includeSubDomains once every subdomain supports HTTPS
Content-Security-PolicyInjected scripts and unwanted third-party contentA policy listing the sources your pages really use, introduced in report-only mode first
X-Content-Type-OptionsBrowsers guessing file typesnosniff
Framing protectionClickjackingframe-ancestors in CSP, or X-Frame-Options: SAMEORIGIN
Referrer-PolicyLeaking full URLs to other sitesstrict-origin-when-cross-origin
Permissions-PolicyUnwanted access to camera, microphone, locationDisable features the site never uses
TLS configurationWeak or outdated encryptionTLS 1.2 and 1.3 only, with a valid certificate
Cookie flagsCookie theft and cross-site misuseSecure, HttpOnly where scripts do not need the cookie, and a suitable SameSite value
Mixed contentInsecure resources on secure pagesEvery image, script and style loaded over HTTPS
Fingerprinting and CMS versionMaking targeted attacks easierNo server version, no generator tag, no version headers
Mail DNS recordsSpoofed email from your domainSPF, DKIM and a DMARC policy
security.txtResearchers not knowing how to report issuesA file at /.well-known/security.txt with Contact and Expires fields

The full explanation of every check is in the Security Audit Guide, and the example audit report shows what a perfect score looks like.

Choosing where to make the fix

A response header can be added at several points between your application and the visitor. Picking one layer and sticking to it avoids the most common problems: headers that appear twice, headers that vanish on some pages, and changes that seem to do nothing because another layer overrides them.

  1. Edge or CDN, such as Cloudflare. Changes apply in front of any origin and are easy to roll back. Good when you cannot touch the server.
  2. Web server, such as nginx or Apache. The most reliable place for headers and TLS settings, and applies to every response, including images and error pages if configured correctly.
  3. Control panel, such as Plesk, cPanel or DirectAdmin. A friendly front end to the web server configuration, with its own quirks about where directives are stored.
  4. Application or CMS, such as WordPress or Drupal. Useful when hosting locks you out of server settings, but usually only covers pages the CMS generates, not static files.

Traps that catch experienced admins

The fix guides

Every guide maps back to the same set of checks. Choose one by how you like to learn, then by where your site is configured.

By skill level

The Beginner Guide gives copy-and-paste fixes for the most common failures with no assumed command-line knowledge, plus what to ask your host when you cannot make a change yourself. The Expert Guide is a dense reference for sysadmins, covering edge cases, trade-offs, header inheritance and patterns that look right but fail in production.

By server or control panel

Plesk covers panel.ini, additional nginx directives, removing the X-Powered-By PleskLin header and securing every domain on a shared install. cPanel covers .htaccess header rules, ModSecurity tuning and Apache or LiteSpeed settings. DirectAdmin covers custom configuration at user and server level. Bare nginx covers add_header placement, server_tokens and ssl_protocols. Bare Apache covers mod_headers, ServerTokens, ServerSignature and ETag fingerprinting. Cloudflare covers Transform Rules and response header changes at the edge, and how they interact with the origin.

By CMS or application

WordPress covers removing the generator tag, adding headers in code or with a plugin, and wp-config.php hardening. Joomla covers the HTTP Headers plugin and version exposure in Joomla 4 and 5. Drupal covers the Security Kit module and removing X-Generator headers in Drupal 10 and 11. Ghost covers running nginx in front of Ghost and the limits of managed Ghost hosting. Forum software covers phpBB, Discourse, Flarum and vBulletin, including cookie security for logged-in members and a CSP that does not break embeds.

Managed and hosted platforms

If your site runs on Shopify, Wix, Squarespace, Webflow, Substack, Medium, Blogger, BigCommerce or a managed WordPress host such as WP Engine or Kinsta, much of what the audit checks is controlled by the platform, not by you. Security headers, TLS protocols, mixed content protection and server fingerprinting are usually handled for you, and you normally cannot change them.

That does not mean there is nothing to do. On most managed platforms you can still control:

If your score is below 100 on a managed platform, the remaining finding is often a platform header such as its own X-Powered-By branding. You cannot remove it, so it is reasonable to accept it as a platform finding and focus on the items you control.

๐Ÿ’ก Ask your platform's support team for their security documentation. Most publish what they set by default, which helps you explain any remaining findings to clients or auditors.

Mail DNS records and security.txt

These two checks sit outside the web server entirely, which is why they are often forgotten even on well-configured sites.

SPF, DKIM and DMARC

SPF lists the services allowed to send email for your domain in a single TXT record. DKIM adds a cryptographic signature to messages, using a key published in DNS by your email provider. DMARC tells receiving servers what to do when a message fails those checks and where to send reports. Together they make it much harder for someone to send convincing fake email in your name, and large mailbox providers such as Gmail and Yahoo now expect them from bulk senders.

  1. List every service that sends email as your domain: your mailbox provider, newsletter tool, shop platform, CRM and helpdesk.
  2. Make sure there is only one SPF record and that it includes all of them. SPF evaluation fails if it needs more than ten DNS lookups.
  3. Turn on DKIM in each sending service and publish the records it gives you.
  4. Start DMARC with p=none and a reporting address, review the reports, then move to quarantine and eventually reject once legitimate mail passes.

security.txt

Defined in RFC 9116, security.txt is a small text file at /.well-known/security.txt that tells security researchers how to report a problem. The Contact and Expires fields are required. Set a reminder to update the expiry date before it passes, because an expired file is reported as a finding.

Which findings to fix first

Not every check carries the same risk, and not every one matters for every site. A brochure site with no logins has different priorities from a shop or a membership forum.

  1. TLS problems and missing HTTPS redirects. Everything else depends on the connection being encrypted.
  2. Cookie flags on login and session cookies. Especially important for shops, forums and any site with accounts.
  3. Mixed content. Browsers may block insecure resources, breaking the page as well as weakening it.
  4. Core headers: HSTS, X-Content-Type-Options, framing protection and Referrer-Policy. Low risk to add and widely supported.
  5. Mail DNS records. Protects your domain's reputation and your customers from spoofed messages.
  6. Fingerprinting and version exposure. Hiding versions does not fix vulnerabilities, but it removes an easy signal for automated attacks. Keeping software updated matters more.
  7. Content-Security-Policy, Permissions-Policy and security.txt. Valuable, but CSP in particular needs care and testing.
โš ๏ธ Always back up configuration files before editing them, and test in a staging copy or on a single domain first. A syntax error in a web server config can take the whole site offline.

Order of work

  1. Run the Security Audit on your domain and note which checks fail.
  2. Work out which layer controls your headers: CDN, web server, control panel or CMS. Pick one layer for headers.
  3. Open the guide for that layer from the list above, or the Beginner Guide if you are unsure.
  4. Fix TLS and HTTPS redirects, then cookie flags and mixed content.
  5. Add the core security headers, then re-run the audit to confirm they appear on every page type, including errors.
  6. Set up SPF, DKIM and DMARC for every service that sends email for your domain.
  7. Remove version information and generator tags.
  8. Introduce a Content-Security-Policy in report-only mode, adjust it, then enforce it.
  9. Publish security.txt and diarise the expiry date.
  10. Re-run the audit after every hosting, plugin or CDN change.

New to all of this? The beginner tutorial explains the basics before you start editing anything.

Questions and answers

1. Which security headers does every website need?

Most sites benefit from Strict-Transport-Security, X-Content-Type-Options set to nosniff, framing protection through CSP frame-ancestors or X-Frame-Options, and a Referrer-Policy such as strict-origin-when-cross-origin. A Content-Security-Policy and Permissions-Policy add further protection but need more tailoring to your site. The exact set depends on what your site does, so use the audit results to see which are missing and add them in whichever layer controls your responses, then run the audit again to confirm them.

2. Why do my headers show on some pages but not others?

This usually means the headers are set in only one part of the configuration. In nginx, an add_header directive inside a location block replaces the headers from the server block, so pages served by that location lose them. Headers set by a CMS may not apply to static files, and headers without the always option may be missing from error pages. Set headers in one consistent place and re-test several page types, including an error page and an image.

3. Will a Content-Security-Policy break my site?

It can if you apply a strict policy without testing, because it blocks any script, style, font or frame from sources the policy does not list. Analytics, payment forms, chat widgets and embedded videos are common casualties. Start with the Content-Security-Policy-Report-Only header, which reports what would be blocked without blocking it. Review the reports, adjust the policy until legitimate resources are allowed, and only then switch to the enforcing header.

4. Should I submit my site to the HSTS preload list?

Only if you are sure every current and future subdomain will always support HTTPS. Preloading builds your domain into major browsers so they never try an unencrypted connection, which is strong protection, but removal takes a long time to reach all users. A normal HSTS header with a long max-age already protects returning visitors. Many sites never preload, and that is a perfectly reasonable choice for a small business website.

5. Does hiding my server version make my site secure?

No. Removing version numbers and generator tags makes it harder for automated tools to match your site to a known vulnerability, which is worthwhile, but the vulnerability is still there if the software is out of date. The real protection is keeping the server, CMS, plugins and themes updated. Treat fingerprint removal as a small extra layer on top of regular updates and good passwords, never as a substitute for them.

6. I use Shopify or Wix. Why is my security score not 100?

On managed platforms the provider controls most server settings, including some headers that identify the platform. You usually cannot remove these, so a score below 100 often reflects the platform rather than anything you did wrong. Focus on what you can control: your domain mail records, cookies set by your own scripts and apps, any insecure links you added to pages, and security.txt if the platform lets you publish it.

7. What is a DMARC policy and which one should I use?

DMARC is a DNS record that tells receiving mail servers how to treat messages that fail SPF and DKIM checks, and where to send reports about them. Start with p=none and a reporting address so you can see which services send mail as your domain without affecting delivery. Once all legitimate mail passes, move to p=quarantine, then p=reject, which gives the strongest protection against spoofing. Review the reports at each step before tightening the policy further.

Run the audit before you start

The Security Audit checks headers, TLS, cookie flags, mixed content, fingerprinting, CMS version exposure, mail DNS records and security.txt, so you can see exactly which fixes your domain needs before changing anything.

Run the Security Audit โ†’
๐Ÿ’ฌ Got a problem?
Related Guides: Security Audit Guide  ·  Example Audit Report  ·  Beginner Tutorial  ·  Beginner Guide  ·  Learning Hub

About aiwebpageseo

aiwebpageseo.com is a data-driven SEO and AEO (Answer Engine Optimisation) platform providing a free suite of technical SEO tools. Rather than relying on AI-theorised assumptions, the platform analyses live URL performance, delivering objective diagnostics, page speed metrics, CLS debugging, and site crawl data alongside actionable technical tutorials.