Your robots.txt file tells search engine crawlers which pages they are allowed (or not allowed) to crawl. Here is how it relates to Google Search Console:
Checking Your Robots.txt
Visit https://yourdomain.com/robots.txt directly in your browser. You should see a plain text file.
Checking If a Specific Page Is Blocked
Use the URL Inspection tool in Search Console - it will specifically tell you if a page is "Blocked by robots.txt" under the crawl details section.
Best Practices for Robots.txt
- Do NOT block pages you want indexed (including CSS and JS files)
- Block admin panels, login pages, thank-you pages, duplicate parameter URLs
- List your sitemap URL in robots.txt:
Sitemap: https://yourdomain.com/sitemap.xml - Never use robots.txt to hide a page from search - use noindex instead (blocked pages can still appear in search if they have links pointing to them)
Robots.txt Tester
Google retired the old Robots.txt Tester and replaced it with the robots.txt report under Settings. That report shows the robots.txt files Google found for your site, when it last crawled them and any warnings or errors, and it lets you request a recrawl after an urgent fix. It cannot test whether a particular URL is allowed, though. For that, check your rules against the URL with my free robots.txt tester, or inspect the URL in Search Console to see whether Googlebot was blocked.