search
SHIELD_AI REPORTS

Domain Security Hardening

Published: 2026-05-30 Updated: 2026-10-26 Author: SageRank Shield Team

A domain is more than a web address. It carries your email, your website, your sign-in pages and your reputation. Most domain-level problems come from a short list of misconfigurations, and each has a standard fix.

This guide goes through them in the order that usually pays back first. None of it needs special software, and each step is something you can verify yourself.

Start with email authentication

If anyone can send mail that looks like it comes from your domain, your customers and your own deliverability pay for it. Three DNS records work together to stop that.

  • SPF is a TXT record that lists the servers allowed to send mail for your domain. Keep exactly one SPF record per domain, and stay under the limit of 10 DNS lookups, because a record that goes over it fails.
  • DKIM signs each message so receivers can check it was not altered and really came from you. Publish the keys your mail provider gives you, use 2048-bit keys where the provider allows it, and rotate them if one is ever exposed.
  • DMARC tells receivers what to do when SPF and DKIM do not line up with the visible From address, and where to send reports. Begin with a policy of p=none and a reporting address, read the reports to find every legitimate sender, fix them, then move to p=quarantine and finally p=reject.

Since February 2024, Google and Yahoo have required SPF, DKIM and DMARC from senders that send in bulk to their users, so these records also affect whether your own mail arrives.

Lock down DNS and the registrar

  • Turn on multi-factor authentication for your registrar and DNS accounts, and use a shared mailbox you control for recovery, not one person's inbox.
  • Enable the registrar lock so the domain cannot be transferred without your approval.
  • Remove DNS records that point to services you no longer use. A forgotten record that points to a cancelled service can let someone else claim that subdomain.
  • Add CAA records to limit which certificate authorities may issue certificates for your domain.
  • Enable DNSSEC if both your registrar and your DNS host support it.

Get TLS right

  • Use a valid certificate on every hostname you serve, with automatic renewal and an alert well before expiry.
  • Allow TLS 1.2 as the minimum and enable TLS 1.3. Turn off older protocol versions and weak cipher suites.
  • Redirect all HTTP traffic to HTTPS.
  • Add HSTS (Strict-Transport-Security) once every subdomain you use works over HTTPS. Start with a short max-age and raise it as you gain confidence. Treat the preload option as close to permanent and use it only when you are sure.

Send the HTTP security headers

Headers are instructions to the browser. They cost nothing and close off whole classes of attack.

  • Content-Security-Policy limits where scripts and other resources can load from. Start in report-only mode, read the reports, then enforce.
  • Strict-Transport-Security keeps browsers on HTTPS.
  • X-Content-Type-Options: nosniff stops browsers guessing file types.
  • Referrer-Policy controls how much of your address is shared with other sites.
  • Permissions-Policy switches off browser features you do not use, such as the camera or microphone.
  • frame-ancestors (in the CSP) or X-Frame-Options stops other sites framing your pages.
  • Set cookies with Secure, HttpOnly and an appropriate SameSite value.

Remove what should never be public

Scans of the open web find the same mistakes again and again. Check that none of these can be fetched from your domain:

  • Environment files such as .env, and version control folders such as .git.
  • Backup archives and database dumps left in the web root.
  • Debug pages, admin panels and test endpoints with no sign-in.
  • Directory listings that show every file in a folder.
  • Storage buckets set to public when they should not be.

A robots.txt rule is not protection. It tells everyone, including attackers, which paths you would rather not be seen. The fix is to remove the file or require authentication.

Close what you do not use

Databases, remote administration and internal tools should not be reachable from the whole internet. Restrict them to known addresses or a private network, and close ports that no service needs.

Check on a schedule

Configuration drifts. A new email provider, a DNS change or a new CDN can quietly break SPF, expose a header or let a certificate lapse. Review these checks monthly, and again after any change to email, DNS or hosting. Keep the results so you can see what changed.

How SageRank checks this

SageRank's Sentinel and Ultimate plans run ten levels of domain security checks, including cipher and protocol settings, open ports, security headers and sensitive files, with a deep scan that uses 20 credits. Before it probes a domain it asks you to prove you own it with a DNS TXT record. SageRank reports what it finds; the fixes are yours to make. See the pricing page for the plans and what we scan for the checks.