How to Add a robots.txt File
Tell crawlers what they may request, and point them at your sitemap.
A missing robots.txt is not fatal — crawlers assume everything is allowed — but you lose the ability to steer crawling and to advertise your sitemap. Adding one lets you keep crawlers out of admin paths and internal search results, and it is where AI crawler access is granted or denied.
Why It Matters
It controls crawling, not indexing: a URL blocked here can still appear in results, and because it cannot be fetched, any noindex on it is never read. Blocking a page you wanted removed is the classic mistake this causes.
How to Fix
Serve it at the root
Start permissive
Declare your sitemap
Decide about AI crawlers
Code Fix
textGET /robots.txt -> 404User-agent: *
Allow: /
Disallow: /admin
Disallow: /api
Disallow: /search
Sitemap: https://example.com/sitemap.xmlPlatform-Specific Instructions
WordPress serves a virtual robots.txt if no real file exists. Adding a physical file overrides it entirely, so include everything you need.
Use app/robots.ts to generate it, or a static file in public/. Do not ship both — the static file wins and the generated one is silently ignored.
Fixed that one.
Now find the rest.
A free audit ranks every issue on your site by the score points it costs — and links each one straight to its guide.
Run a free audit