Google's security.txt lists two contact routes, a PGP key, a bug bounty policy and a hiring page. Ours has one email address and an expiry date. Both are valid. The standard asks for exactly two things, and the second one is the part people forget.
If a scan just told you No security.txt File Found, this is the five-minute fix: one text file, in one folder, checked with one curl command.
TL;DR
Create public/.well-known/security.txt with a Contact: line (an email or https URL) and one Expires: line less than a year out. Vite, Next.js and Nuxt all copy public/ to the site root, so it lands at https://yourdomain.com/.well-known/security.txt. Confirm with curl -i that you get text/plain back, not your app's HTML. Set a reminder before the expiry date.
What security.txt is for
Someone finds that your /api/users endpoint returns every customer's email. They want to tell you. Your site has a Discord link, a Twitter handle and a contact form that goes to a sales inbox. So they guess, or they give up, or they post it.
RFC 9116, published in April 2022, fixes that with a file at a predictable address. Researchers and disclosure tools know to look at /.well-known/security.txt, the same way crawlers know to look for robots.txt. That's the same reason the founders in this story added one after a researcher had to hunt for a way to reach them.
It doesn't stop any attack. It shortens the gap between "someone found it" and "you know about it", which for a small app is often the whole game.
The file
Here's the one we serve at checkyourvibe.dev/.well-known/security.txt, copied as it was on November 10, 2026:
# Security contact for CheckYourVibe
# https://securitytxt.org/ | RFC 9116
Contact: mailto:hello@checkyourvibe.dev
Expires: 2027-02-28T23:59:59.000Z
Preferred-Languages: en
Canonical: https://checkyourvibe.dev/.well-known/security.txt
Only two of those lines are required:
| Field | Required? | Rule from RFC 9116 |
|---|---|---|
Contact: | Yes, at least once | A URI: mailto:, https:// or tel:. List several in order of preference |
Expires: | Yes, exactly once | RFC 3339 date. Recommended less than a year in the future |
Policy: | No | Link to a page saying how you handle reports |
Acknowledgments: | No | Link to a thanks page for reporters |
Preferred-Languages: | No | At most once, e.g. en |
Canonical: | No | The URL(s) this file is meant to live at |
Encryption: | No | Link to a PGP key |
Hiring: | No | Link to security jobs |
For the Contact: address, use one you actually read. A security@ alias that forwards to your own inbox is fine. A shared support queue that a contractor triages once a week isn't.
The RFC recommends signing the file with an OpenPGP cleartext signature. For a solo founder that's optional, and skipping it is normal. If you do sign it, add a Canonical: line too, since that's what lets a signature prove which URL the file belongs to.
Where the file goes
The rule is the same everywhere: the file has to come out at /.well-known/security.txt on your live domain, over HTTPS, as text/plain.
Vite projects (Lovable, Bolt, most React SPAs). Create public/.well-known/security.txt. Vite copies everything in public/ to the root of dist/ at build time, dot-folders included. We checked this on Vite 8.3.5: a fresh build put the file at dist/.well-known/security.txt with no config.
Next.js. Same path, public/.well-known/security.txt. Next serves public/ from the site root, so no route or middleware is needed.
Nuxt. Also public/.well-known/security.txt. That's exactly where ours lives, and production serves it with text/plain; charset=utf-8.
Firebase Hosting. Put the file in your build output's .well-known/ folder, then open firebase.json. The default hosting config includes "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], and **/.* matches names that start with a dot. If .well-known is skipped on deploy, that pattern is why. Narrow it or add an exception, then confirm with the curl check below rather than trusting the deploy log.
Don't put real secrets or internal hostnames in this file. It's public by design, and a Policy: page that lists your staging URL hands out a map.
Confirm it's actually served
The dashboard and the build folder only tell you what should happen. This tells you what does:
curl -i https://yourdomain.com/.well-known/security.txt
You want three things in the response:
HTTP/2 200content-type: text/plain(a; charset=utf-8suffix is fine, and the RFC asks for it)- your
Contact:line in the body
If the body starts with <!DOCTYPE html>, the file isn't deployed and your host is serving the app shell instead.
Why a scan can flag a file you never made
The CheckYourVibe scanner fetches /security.txt and /.well-known/security.txt and reports one of four things:
| Finding | Severity | What it saw |
|---|---|---|
| No security.txt File Found | Info | Neither path returned a 200 with a body |
| security.txt Missing Required Contact Field | Low | A 200 response with no Contact: line |
| security.txt Missing Expires Field | Info | A 200 response with no Expires: line |
| security.txt Has Expired | Low | An Expires: year that's long gone |
Here's the catch for vibe-coded apps. A single-page app on Netlify, Vercel or similar usually has a catch-all rule that answers any unknown path with index.html and a 200. Request /.well-known/security.txt from that app and you get your homepage's HTML back. The scanner accepts any 200 with a body as "a file exists", so it reads your HTML, finds no Contact: line, and reports Missing Required Contact Field on a file you never wrote.
The fix is the same as for the missing-file finding: add the real file. Netlify and Vercel both serve a static file that exists before they apply a rewrite, so the real security.txt wins over the catch-all as soon as it's deployed. Run the curl check above afterward to see it.
So if Missing Contact and Missing Expires show up together on an app that has never had a security.txt, check for the HTML answer before anything else.
Keep it from expiring
The Expires: field is there so abandoned files age out. It also means yours will, unless someone renews it.
- Pick a date 10 to 11 months ahead.
- Set a calendar reminder for a month before.
- When it fires, send a test email to your
Contact:address, confirm it reaches you, then push a new date.
An expired security.txt tells a researcher that nobody's checked that inbox in a year. That's arguably worse than not having one, because it looks like you tried and stopped.
Where do I put security.txt?
At /.well-known/security.txt on your domain, served over HTTPS. RFC 9116 says the file MUST live under /.well-known/. In Vite (Lovable, Bolt), Next.js and Nuxt projects, that means creating public/.well-known/security.txt, which the build copies to the site root. A copy at /security.txt is allowed for legacy tools, but if both exist the /.well-known/ one wins.
What has to be in a security.txt file?
Two fields. Contact, which can appear more than once and must be a URI such as mailto:security@yourdomain.com or an https:// link. And Expires, which must appear exactly once, as a date like 2027-10-31T23:59:59.000Z. Everything else (Policy, Acknowledgments, Encryption, Preferred-Languages, Canonical, Hiring) is optional.
What date should I use for Expires?
Less than a year out. RFC 9116 recommends that so stale files age out on their own. Pick a date 10 or 11 months ahead and set a calendar reminder a month before it, because an expired file tells researchers nobody is reading the inbox.
Why does my scan say security.txt is missing a Contact field when I never created one?
Your host is probably answering /.well-known/security.txt with your app's index.html. Single-page apps serve that page for any unknown path with a 200 status, so a request for security.txt gets HTML back, and HTML has no Contact line. Run curl -i on the URL to confirm. Adding the real file fixes it, because Netlify and Vercel serve an existing static file before applying an SPA rewrite.
Is security.txt required?
No law or platform requires it, and its absence isn't a vulnerability, which is why a scan reports it as informational. It's a one-file way to make sure the person who finds a hole in your app can tell you privately instead of posting it.
Is Your security.txt Actually Served?
Run a free scan to check security.txt, exposed files and headers on your live site. 60 seconds, no signup.