webzod
account

Fix the syntax of robots.txt on WordPress

hygiene.robots.invalid · effort: minutes

Why it matters

A robots.txt that is really an html page, has rules before any User-agent line, or misspells a directive is partly or wholly ignored by crawlers. Rules you meant to apply then do nothing.

The fix

  1. If a plugin edits robots.txt, open its editor (usually under the SEO plugin's tools) and fix the lines there. A physical robots.txt in the web root overrides the virtual one.
  2. Reload https://example.com/robots.txt to check the result.

The examples use example.com. Replace it with your own domain.

Read the documentation (opens in a new tab)

Scan your domain to see whether this applies to you.