Site files (ads.txt, llms.txt, security.txt, robots.txt)
Some small text files have to sit at the root of your site: ads.txt for ad networks, llms.txt for AI assistants, security.txt for people who report security issues. Normally you'd upload them to the server. With Snipfire you type them in WordPress, and Snipfire serves them.
Go to Snipfire → Tools & Safe Mode → Files.
| File | What it's for |
|---|---|
/robots.txt |
Lines added to the end of the robots.txt WordPress makes: sitemaps, crawler rules |
/ads.txt |
Authorised ad sellers, for ad networks such as Google AdSense |
/app-ads.txt |
Authorised ad sellers for your mobile apps |
/llms.txt |
A short guide to your site for AI assistants and large language models |
/.well-known/security.txt |
How to report security issues to you (RFC 9116). Needs at least Contact: and Expires: lines |
Type or paste the contents into the box and click Save files. Open next to a file shows it as visitors get it. Leave a box empty to switch that file off.
How they're served
- Each file is served as plain text at its address, for example
https://example.com/ads.txt, straight from WordPress. There's nothing to upload and nothing to keep in sync by hand. - For
robots.txt, Snipfire doesn't replace WordPress's own file: it adds your lines at the end, after a blank line. That way WordPress's rules (and those added by your SEO plugin) stay in place. - The files are settings, not snippets. They don't appear in the snippet list, and they aren't part of exports or Git sync.
- Each file can be up to 100 KB.
When a file isn't used
- A real file with the same name on the server wins, because the web server sends it before WordPress runs. Snipfire warns you on the Files screen: A real file with this name exists on the server and is served instead. Delete it to use this one. For
robots.txt, a real file means WordPress's robots.txt, and your lines, aren't used at all. - A site in a subfolder (for example
https://example.com/blog/) can't serve files at the root of the domain. Only the robots.txt lines apply, and the screen says so. - A page cache or CDN may keep serving an old copy for a while. Browsers are told they may keep a copy for an hour.
Example: security.txt
Contact: mailto:security@example.com
Expires: 2027-12-31T23:59:00.000Z
Preferred-Languages: en, el
Update the Expires: date before it passes: an expired security.txt should be ignored.
Who can change them
People with full Snipfire access (administrators, and with Snipfire Pro any role you gave Full, including PHP). With Pro, changes are recorded in the activity log.
From the command line
wp snipfire files # each file, its address, and whether a real file wins
wp snipfire files ads # show ads.txt
wp snipfire files ads --set="google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0"
wp snipfire files llms --set=- < llms.txt # read the contents from standard input
wp snipfire files security --set="" # switch security.txt off
File names for the command: robots, ads, app-ads, llms, security. See WP-CLI.
Something unclear or missing? Tell us