This error appears when the robots.txt file contains incorrectly written directives or invalid content. Here's what it means and how to fix it so your rules work as expected.
A syntax error can leave exposed pages with duplicate or low-quality content that compete with your main pages in search results, diluting their rankings. Or conversely, it can block important pages that stop ranking without anyone noticing.
A syntax error can cause Google to interpret a blocking rule where there shouldn't be one, leaving important pages out of its reach without anyone having decided that.
The robots.txt is one of the most basic files on any website. Having it with syntax errors signals that technical maintenance isn't being managed carefully, and that can affect the trust Google places in the site's configuration.
If this error showed up in your audit, here are the steps to leave it behind.
Although Ruk Audit has already pointed out which directives are incorrectly written or what content is invalid, open your robots.txt URL — accessible at yourdomain.com/robots.txt — and check whether the browser shows plain text or an HTML page, as that will tell you whether the source of the problem is the server or the file itself.
If the browser returns HTML instead of plain text, the server isn't correctly configured. Contact your hosting provider to make sure the robots.txt is served with Content-Type "text/plain" and a 200 status code.
If the content is plain text but has errors, edit the file correcting each detected problem. The most common directives are User-agent, Disallow, and Allow, and they must be written exactly like that — with the first letter capitalized and no typos. Each directive must be on its own line, with no spaces before the name and a space after the value.
Once the changes are applied, use Google Search Console's robots.txt tester to confirm the syntax is correct and that the rules are being interpreted as expected before considering the changes final.
Audit your website for free and discover if this and other SEO errors are affecting your ranking.
We use them to make the site work properly, understand how you use it and improve our marketing. You can accept, reject or configure them. More information in our cookie policy.