Create and check your robots.txt file
robots.txt tells crawlers which parts of your site they may fetch and where your sitemap is. Here is how to publish a safe one and avoid blocking important pages by accident.
The problem
Your site has no robots.txt file at the root, or the file could not be read.
How to spot it
- Opening
https://yourdomain.com/robots.txtshows a 404 page or an error. - The audit reports "robots.txt is available" as an issue.
Why it matters
Crawlers request /robots.txt before anything else. The file is the standard place to point them to your XML sitemap and to keep them out of areas that should not be crawled, such as internal search results or admin pages. Without it, crawlers assume everything may be fetched, which is fine, but you lose the easiest way to announce your sitemap.
What happens if you leave it
A missing file is not an error in itself. A file that returns a server error (5xx) is worse: well-behaved crawlers then treat the whole site as off-limits until it is fixed.
How to fix it
-
Create a plain-text file named
robots.txt(lowercase). -
Start with a permissive file and add only the rules you need:
User-agent: * Disallow: /wp-admin/ Allow: /wp-admin/admin-ajax.php Sitemap: https://www.example.com/sitemap.xmlReplace the paths and the sitemap URL with your own. If you have nothing to block, keep just
User-agent: *and theSitemap:line. -
Upload it to the root of your domain so it is served at
https://yourdomain.com/robots.txt. A robots.txt in a subfolder is ignored. -
Make sure the server returns HTTP 200 with
Content-Type: text/plain. -
If your site exists on several hosts (for example
shop.example.com), each host needs its own file.
Platform-specific notes
- WordPress: WordPress serves a virtual robots.txt. SEO plugins let you edit it; a physical
robots.txtfile in the web root takes precedence. - Shopify: edit the
robots.txt.liquidtheme template rather than uploading a file. - Static hosting / CDN: place the file in the published root folder (often
public/ordist/).
Common mistakes
Disallow: /left over from a staging site. This blocks your whole site.- Blocking CSS or JavaScript folders that pages need to render.
- Using robots.txt to hide private pages. It is public, and it is a request, not access control. Use authentication or
noindexinstead. - Expecting
Disallowto remove pages from search results. Blocked pages can still be indexed from links; usenoindexto keep a page out.
How to check the fix worked
- Open
https://yourdomain.com/robots.txtin a private browser window. You should see the plain-text rules. - Check that your homepage and key pages are not disallowed for
*. - Run a new WebGrowthEngine scan; the robots.txt check should pass and the sitemap should be found.
References and further reading
Related tutorials
Build an XML sitemap that only lists the right pages
A clean sitemap lists every page you want found: live, final and indexable. This guide covers creating one, ke...
Fix broken links and pages that return errors
Find and repair links to missing pages, restore or redirect dead URLs, and deal with server errors and unreach...
Remove redirect chains and update links to redirected URLs
Redirect old URLs straight to their final destination in one hop, and point your own links at final URLs.