We Ran Our Own Live SPF/DMARC/CSP Grader on Our Prod Domain and Got 37/100 (Grade F) - Fixing It to 100/100 A+ in 15 Mins
Tonight we shipped a passive public domain spoofing & HTTP attack-surface grader (ExposeShield) and did the one thing every dev should do before tweeting a launch: we ran it against our own production domain (sentineldef
Tonight we shipped a passive public domain spoofing & HTTP attack-surface grader (ExposeShield) and did the one thing every dev should do before tweeting a launch: we ran it against our own production domain (sentineldefense.io).
Result: 37/100 (Grade F).
Embarrassing - and also a textbook demo of the exact gaps we found in 21% of the 48 DTC e-commerce brands we audited earlier this week. Here is the exact 15-minute diff that moved us from 37/100 (F) to 100/100 (Grade A+) on live DNS and Vercel edge headers.
What failed on our own domain (and fails on most Next.js / Shopify sites)
Even though we already had Strict-Transport-Security, X-Frame-Options: DENY, X-Content-Type-Options: nosniff, and CAA records on Vercel DNS, our live passive scan flagged four real gaps:
-
Missing root SPF record (
-20 pts): Becausesentineldefense.iois a pure web-app domain (we don't send mail from it), we never published an SPF TXT record. Withoutv=spf1 -all, spoofing tools can forge emails claiming to come from[email protected]. -
Missing
_dmarcTXT record (-25 pts): Nop=rejectpolicy meant receiving mail gateways had zero instruction to drop forged messages using our domain. -
Missing
Content-Security-Policy(-12 pts): Standard Next.js headers didn't restrict third-party script execution or framing viaframe-ancestors 'none'. -
Missing RFC 9116
/.well-known/security.txt(-6 pts): Security researchers and abuse desks had no machine-readable contact URL.
The exact 3-step fix (copy-pasteable)
Step 1: Lock non-sending app domains with RFC 7505 SPF + DMARC p=reject
If your app domain does not send email (or if you send only from a verified provider), publish explicit records at your DNS host (Cloudflare, Route 53, Vercel DNS):
# Non-sending web app domain (blocks 100% of spoofing):
TXT @ "v=spf1 -all"
TXT _dmarc "v=DMARC1; p=reject; sp=reject; adkim=s; aspf=s"
(If your domain DOES send mail via Google Workspace / Microsoft 365 / Postmark, start with p=quarantine for 14 days while verifying DKIM/SPF alignment before stepping up to p=reject.)
Step 2: Add Content-Security-Policy in next.config.ts
const SECURITY_HEADERS = [
{ key: "X-Content-Type-Options", value: "nosniff" },
{ key: "X-Frame-Options", value: "DENY" },
{ key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },
{ key: "Permissions-Policy", value: "camera=(), microphone=(), geolocation=()" },
{ key: "Strict-Transport-Security", value: "max-age=63072000; includeSubDomains; preload" },
{
key: "Content-Security-Policy",
value:
"default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data: https:; connect-src 'self' https://checkout.stripe.com; frame-ancestors 'none'; base-uri 'self'; form-action 'self' https://checkout.stripe.com; upgrade-insecure-requests",
},
];
Step 3: Publish public/.well-known/security.txt (RFC 9116)
Contact: mailto:[email protected]
Expires: 2027-12-31T23:59:59.000Z
Preferred-Languages: en
Canonical: https://yourdomain.com/.well-known/security.txt
Live re-scan after deploy: 100/100 (Grade A+)
Right after pushing DNS + Vercel prod, re-scanning returned:
-
SPF: 20/20 (v=spf1 -all) -
DMARC: 25/25 (p=reject) -
CAA: 10/10 (letsencrypt.org,pki.goog,sectigo.com) -
HSTS: 12/12 -
CSP: 12/12 -
Clickjacking / nosniff / Referrer: 11/11 -
security.txt & banner hygiene: 10/10
Test your own domain free (zero signup, passive public checks only)
We left all of our live defense scanners open in the browser with no login wall:
- Live SPF / DMARC / CAA / CSP Security Grader: https://sentineldefense.io/security
- 16-Variant Lookalike & Fake-Store Phishing Radar: https://sentineldefense.io/phish
- Fake 1-Star Review & FTC 16 CFR Part 465 Appeal Dissector: https://sentineldefense.io/reviews
- Amazon / Etsy / TikTok Shop / Temu Counterfeit Dissector: https://sentineldefense.io/marketplace
- All 8 Engines Under One Agency License (PR, Law, Shopify & OFM): https://sentineldefense.io/agency
Drop your score below if you test your own prod domain - curious how many Next.js and Shopify stacks are still missing _dmarc or security.txt.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.