---
title: "robots.txt serves HTML, exceeds 500 KiB, or has unparseable lines (seo/robots-txt-invalid)"
description: "seo/robots-txt-invalid: A catch-all route returning HTML for /robots.txt means no rules; content after 500 KiB is ignored; malformed lines are skipped…"
canonical: https://void-design.vercel.app/rules/seo/robots-txt-invalid
lastModified: 2026-09-16
---

# robots.txt serves HTML, exceeds 500 KiB, or has unparseable lines

`seo/robots-txt-invalid` · severity **warn** · category SEO · detected by `void seo` and `void audit`

## Why it matters

A catch-all route returning HTML for /robots.txt means no rules; content after 500 KiB is ignored; malformed lines are skipped silently.

## How to fix it

Generate robots.txt with app/robots.ts, keep it small, and use only User-agent/Allow/Disallow/Sitemap lines.

## References

- https://developers.google.com/crawling/docs/robots-txt/robots-txt-spec

## More seo rules

`void seo` reports 60 rules in this category. What search engines need from the raw response: status codes, titles and descriptions in <head>, self-referencing canonicals, one h1, crawlable links, Open Graph, icons, robots.txt and a sitemap with real dates.

- `manifest` Web app manifest missing or incomplete — [seo/manifest](https://void-design.vercel.app/rules/seo/manifest)
- `theme-color` No theme-color meta — [seo/theme-color](https://void-design.vercel.app/rules/seo/theme-color)
- `robots-txt-unreachable` robots.txt returns 5xx/429 or times out — [seo/robots-txt-unreachable](https://void-design.vercel.app/rules/seo/robots-txt-unreachable)
- `robots-txt-missing` No robots.txt — [seo/robots-txt-missing](https://void-design.vercel.app/rules/seo/robots-txt-missing)
- `robots-blocks-all` robots.txt disallows the site for * / Googlebot / Bingbot — [seo/robots-blocks-all](https://void-design.vercel.app/rules/seo/robots-blocks-all)
- `robots-blocks-resources` robots.txt blocks JS/CSS needed to render — [seo/robots-blocks-resources](https://void-design.vercel.app/rules/seo/robots-blocks-resources)
- `robots-sitemap-directive` robots.txt has no absolute Sitemap: line — [seo/robots-sitemap-directive](https://void-design.vercel.app/rules/seo/robots-sitemap-directive)
- `sitemap-missing` No reachable sitemap — [seo/sitemap-missing](https://void-design.vercel.app/rules/seo/sitemap-missing)

Detected by `void seo` and `void audit`. Explain it in a terminal: `void rules seo/robots-txt-invalid`
