Missing robots.txt in Vue
robots.txt is the first file most crawlers request. It lets you allow or disallow paths and — importantly — point crawlers at your sitemap. It is optional but recommended: without it, crawling is left to defaults, and you lose an easy place to advertise your sitemap and manage crawl access.
Symptoms
How VibeCheck catches it
In your widget · Problems
Missing robots.txt
To your coding agent · MCP
agent › get_detected_issues
→ { detector: "seo", issue: "Missing robots.txt", threshold: "/robots.txt is not a 2xx text/plain response" }
The same string in your widget and in your agent’s context — no screenshot, no copy-paste.
Root causes
The fix for Vue
In Nuxt, place robots.txt in the public/ directory, or use the @nuxtjs/robots module to generate it from config. A plain Vite + Vue app is the same as React — a static file in public/.
public/robots.txt # served at /robots.txtSteps
- Create a
robots.txtthat allows crawling and lists your sitemap - Serve it at
/robots.txtwith atext/plaincontent type - Disallow only paths you truly want uncrawled
FAQ
- Does
robots.txtmake a page private? - No. It only requests that compliant crawlers skip a path. The page is still reachable by URL. To keep content private, use authentication; to keep it out of search, use
noindex. - What is the minimum useful
robots.txt? - Allow all crawling and point to your sitemap: “
User-agent: *”, “Allow: /”, and a “Sitemap:” line. That is enough for most sites. - Can
robots.txtblock AI crawlers? - Yes — you can disallow specific AI user-agents. If you want to be cited by AI answer engines, do the opposite and allow them; VibeCheck’s AEO audit checks for that.
- Why does VibeCheck flag
robots.txtas missing when the file exists? - The probe treats
/robots.txtas missing unless it responds 2xx with atext/plaincontent type. An SPA dev server that returnsindex.htmlfor unknown paths reads as “not a realrobots.txt” — serve it as plain text to clear the check. - Should I disallow anything by default?
- No. Start with “
Allow: /” and only disallow paths you genuinely want kept out of the index — a staging area, internal search results, or duplicate print views. Over-broadDisallowrules are a common way to accidentally de-index a whole site.