{
    "title": "robots.txt is not served as a plain text file",
    "description": "/robots.txt answers with a web page, redirects elsewhere, is too big or is not plain UTF-8 text, so crawlers may miss your rules.",
    "url": "https://ursy.com/issues/robots-txt-not-plain-text/",
    "canonical": "https://ursy.com/issues/robots-txt-not-plain-text/",
    "markdown": "https://ursy.com/issues/robots-txt-not-plain-text/index.md",
    "json": "https://ursy.com/issues/robots-txt-not-plain-text/index.json",
    "published": "2026-11-29T21:57:23+00:00",
    "updated": "2026-11-30T12:53:03+00:00",
    "language": "en-GB",
    "publisher": {
        "name": "URSY.com",
        "url": "https://ursy.com/"
    },
    "cite": "Name URSY.com and link https://ursy.com/issues/robots-txt-not-plain-text/",
    "start_here": {
        "page": "https://ursy.com/issues/robots-txt-not-plain-text/",
        "markdown": "https://ursy.com/issues/robots-txt-not-plain-text/index.md",
        "json": "https://ursy.com/issues/robots-txt-not-plain-text/index.json",
        "cite": "Name URSY.com and link the page you used.",
        "doors": {
            "llms_txt": "https://ursy.com/llms.txt",
            "facts": "https://ursy.com/facts.json",
            "mcp": "https://ursy.com/mcp/",
            "openapi": "https://ursy.com/.well-known/openapi.json"
        }
    },
    "issue": {
        "slug": "robots-txt-not-plain-text",
        "problem": "robots.txt is not served as a plain text file",
        "summary": "/robots.txt answers with a web page, redirects elsewhere, is too big or is not plain UTF-8 text, so crawlers may miss your rules.",
        "status": "Live",
        "priority": "medium",
        "category": "robots",
        "category_title": "robots.txt",
        "why_it_matters": [
            "Crawlers expect /robots.txt to be a plain UTF-8 text file at the root of each host. Google documents a size limit of 500 KiB, and rules after that point are ignored. Characters that are not valid UTF-8 may be ignored too, which can break the rules they are in.",
            "Two mistakes are common. Some sites send every unknown address to the home page, so /robots.txt answers with a web page: crawlers find no rules in it and treat the site as having none. Others redirect robots.txt to another host. Google follows at least five redirects and then treats the file as missing, and not every bot follows a redirect to another host."
        ],
        "how_to_fix": [
            "Serve a real text file at /robots.txt on each host you use (www and non-www, http and https), with the header Content-Type: text/plain; charset=utf-8. Save it as UTF-8 and keep it short: use * patterns instead of long lists of addresses.",
            "If you have no rules, let the address answer 404 rather than a web page. Then check it with the Robots.txt Checker."
        ],
        "steps": [
            "Open /robots.txt and check that you see plain text, not a page.",
            "Upload a real file, saved as UTF-8, to the root of each host.",
            "Remove redirects on /robots.txt, or keep them to one hop."
        ],
        "check_it_is_fixed": "Run the URSY.com Robots.txt Checker (/robots-txt-checker/) again. It should get 200 straight away, with a text/plain content type and your rules, not a web page.",
        "found_by": [
            {
                "tool": "robots-txt-checker",
                "name": "Robots.txt Checker",
                "status": "Live",
                "page": "https://ursy.com/robots-txt-checker/",
                "card": "https://ursy.com/robots-txt-checker.json"
            },
            {
                "tool": "crawl-trap-checker",
                "name": "Crawl Trap Checker",
                "status": "Live",
                "page": "https://ursy.com/crawl-trap-checker/",
                "card": "https://ursy.com/crawl-trap-checker.json"
            },
            {
                "tool": "common-crawl-checker",
                "name": "Common Crawl Checker",
                "status": "Live",
                "page": "https://ursy.com/common-crawl-checker/",
                "card": "https://ursy.com/common-crawl-checker.json"
            },
            {
                "tool": "ai-bot-checker",
                "name": "AI Bot Checker",
                "status": "Live",
                "page": "https://ursy.com/ai-bot-checker/",
                "card": "https://ursy.com/ai-bot-checker.json"
            }
        ],
        "full_record": "https://ursy.com/wp-json/ursy/v1/issues/robots-txt-not-plain-text",
        "source": {
            "url": "https://www.rfc-editor.org/rfc/rfc9309",
            "title": "RFC 9309: Robots Exclusion Protocol"
        },
        "cite": "robots.txt is not served as a plain text file. URSY.com. https://ursy.com/issues/robots-txt-not-plain-text/"
    },
    "headings": [
        {
            "level": 2,
            "text": "Why it matters",
            "id": "why-it-matters",
            "url": "https://ursy.com/issues/robots-txt-not-plain-text/#why-it-matters"
        },
        {
            "level": 2,
            "text": "How to fix it",
            "id": "how-to-fix-it",
            "url": "https://ursy.com/issues/robots-txt-not-plain-text/#how-to-fix-it"
        },
        {
            "level": 3,
            "text": "What the problem looks like",
            "id": "what-the-problem-looks-like",
            "url": "https://ursy.com/issues/robots-txt-not-plain-text/#what-the-problem-looks-like"
        },
        {
            "level": 3,
            "text": "What it looks like fixed",
            "id": "what-it-looks-like-fixed",
            "url": "https://ursy.com/issues/robots-txt-not-plain-text/#what-it-looks-like-fixed"
        },
        {
            "level": 2,
            "text": "Fix it with your AI assistant",
            "id": "fix-it-with-your-ai-assistant",
            "url": "https://ursy.com/issues/robots-txt-not-plain-text/#fix-it-with-your-ai-assistant"
        },
        {
            "level": 2,
            "text": "Fix it on your platform",
            "id": "fix-it-on-your-platform",
            "url": "https://ursy.com/issues/robots-txt-not-plain-text/#fix-it-on-your-platform"
        },
        {
            "level": 3,
            "text": "WordPress",
            "id": "wordpress",
            "url": "https://ursy.com/issues/robots-txt-not-plain-text/#wordpress"
        },
        {
            "level": 3,
            "text": "A hand-made site",
            "id": "a-hand-made-site",
            "url": "https://ursy.com/issues/robots-txt-not-plain-text/#a-hand-made-site"
        },
        {
            "level": 3,
            "text": "Your server or hosting",
            "id": "your-server-or-hosting",
            "url": "https://ursy.com/issues/robots-txt-not-plain-text/#your-server-or-hosting"
        },
        {
            "level": 2,
            "text": "Check it is fixed",
            "id": "check-it-is-fixed",
            "url": "https://ursy.com/issues/robots-txt-not-plain-text/#check-it-is-fixed"
        },
        {
            "level": 2,
            "text": "Official source",
            "id": "official-source",
            "url": "https://ursy.com/issues/robots-txt-not-plain-text/#official-source"
        },
        {
            "level": 2,
            "text": "Questions",
            "id": "questions",
            "url": "https://ursy.com/issues/robots-txt-not-plain-text/#questions"
        },
        {
            "level": 3,
            "text": "Can robots.txt redirect to another address?",
            "id": "can-robots-txt-redirect-to-another-address",
            "url": "https://ursy.com/issues/robots-txt-not-plain-text/#can-robots-txt-redirect-to-another-address"
        },
        {
            "level": 3,
            "text": "My robots.txt is very long. Does that matter?",
            "id": "my-robots-txt-is-very-long-does-that-matter",
            "url": "https://ursy.com/issues/robots-txt-not-plain-text/#my-robots-txt-is-very-long-does-that-matter"
        }
    ],
    "links": [
        {
            "text": "redirects",
            "url": "https://ursy.com/wiki/redirect/",
            "internal": true
        },
        {
            "text": "Google",
            "url": "https://ursy.com/wiki/google/",
            "internal": true
        },
        {
            "text": "robots.txt",
            "url": "https://ursy.com/wiki/robots-txt/",
            "internal": true
        },
        {
            "text": "bot",
            "url": "https://ursy.com/wiki/bot-web-robot/",
            "internal": true
        },
        {
            "text": "ChatGPT",
            "url": "https://ursy.com/wiki/chatgpt/",
            "internal": true
        },
        {
            "text": "RFC 9309: Robots Exclusion Protocol",
            "url": "https://www.rfc-editor.org/rfc/rfc9309",
            "internal": false
        }
    ],
    "words": 722,
    "text": "/robots.txt answers with a web page, redirects elsewhere, is too big or is not plain UTF-8 text, so crawlers may miss your rules. Why it matters Crawlers expect /robots.txt to be a plain UTF-8 text file at the root of each host. Google documents a size limit of 500 KiB, and rules after that point are ignored. Characters that are not valid UTF-8 may be ignored too, which can break the rules they are in. Two mistakes are common. Some sites send every unknown address to the home page, so /robots.txt answers with a web page: crawlers find no rules in it and treat the site as having none. Others redirect robots.txt to another host. Google follows at least five redirects and then treats the file as missing, and not every bot follows a redirect to another host. How to fix it Serve a real text file at /robots.txt on each host you use (www and non-www, http and https), with the header Content-Type: text/plain; charset=utf-8. Save it as UTF-8 and keep it short: use * patterns instead of long lists of addresses. If you have no rules, let the address answer 404 rather than a web page. Then check it with the Robots.txt Checker. Open /robots.txt and check that you see plain text, not a page. Upload a real file, saved as UTF-8, to the root of each host. Remove redirects on /robots.txt, or keep them to one hop. What the problem looks like GET /robots.txt HTTP/1.1 Host: www.example.com HTTP/1.1 200 OK Content-Type: text/html; charset=UTF-8 <!DOCTYPE html> <html lang=\"en\"><head><title>Home | Example</title> The site answers every unknown address with the home page, so crawlers find a web page and no rules. What it looks like fixed location = /robots.txt { default_type text/plain; charset utf-8; try_files $uri =404; } nginx serves the real file as UTF-8 plain text, or 404 if it is missing, and never falls back to the home page. Fix it with your AI assistant Paste this into ChatGPT, Claude, Gemini or your coding agent, and fill in the words in square brackets: My website [your website address] runs on [your platform, e.g. a React app on nginx]. A check says /robots.txt is not served as a plain text file: it answers with a web page, redirects, is too large or is not UTF-8. First fetch [your website address]/robots.txt on each host I use (with and without www, http and https), and show me the status, redirects, Content-Type and the first lines (or ask me to paste them). Explain in plain words what is wrong. Then make it a real UTF-8 text file at the root of each host, served as text/plain; charset=utf-8 with no redirect, kept under 500 KiB, with an exact rule placed before any catch-all. Rules: back up the configuration first, keep my current rules word for word, and do not change any other address. Give me the exact file or configuration and where it goes. Finally, tell me to re-check with the URSY.com Robots.txt Checker at ursy.com/robots-txt-checker/. Fix it on your platform WordPress Make sure WordPress, or a real robots.txt file in the root, answers this address. A plugin or theme that sends unknown addresses to the home page can swallow it. A hand-made site Single-page app hosting often sends every address to index.html. Put a real robots.txt file in the folder you publish, so the host serves it before the fallback. Your server or hosting Add an exact rule for /robots.txt above any catch-all rewrite, and remove redirects on it. Serve it with Content-Type: text/plain; charset=utf-8 on every host you use. Check it is fixed Run the URSY.com Robots.txt Checker (/robots-txt-checker/) again. It should get 200 straight away, with a text/plain content type and your rules, not a web page. Official source RFC 9309: Robots Exclusion Protocol Questions Can robots.txt redirect to another address? Google follows a few redirects, but not every bot follows a redirect to another host. It is safest to serve the file directly on each host. My robots.txt is very long. Does that matter? Google ignores rules after 500 KiB. Replace long lists of addresses with short patterns that use *.",
    "source": "https://ursy.com/issues/robots-txt-not-plain-text/"
}