Start with a preset
Your robots.txt
Test a URL
How to use the Robots.txt Generator
- Pick a preset. WordPress is a safe choice for most sites.
- Add your website and sitemap URL.
- Tick any extra folders or bots you want to block.
- Use Test a URL to check that important pages are still allowed.
- Copy or download the file and upload it to the root of your site, so it opens at
yoursite.com/robots.txt.
In WordPress, you can edit robots.txt with Yoast SEO (Yoast SEO → Tools → File editor) or Rank Math (General Settings → Edit robots.txt), without using FTP.
What is a robots.txt file?
robots.txt is a small text file that tells search engine bots which parts of your site they can and can’t crawl. Good bots like Googlebot and Bingbot read it before crawling. It helps them spend their time on your important pages instead of admin areas, search results and filter pages.
Common robots.txt mistakes
- Blocking the whole site by accident with
Disallow: /, often left over from a staging site. - Blocking CSS and JavaScript (like /wp-includes/), which stops Google from rendering your pages properly.
- Using robots.txt to hide pages from Google. Blocked pages can still be indexed if other sites link to them. Use a
noindextag instead. - Forgetting the sitemap line, which helps search engines find all your pages.
Made by Maroof Ahmed. More free tools: SERP Snippet Preview, Keyword Density Checker, Heading Structure Checker, URL Slug Generator and Schema Markup Generator. Need help with your SEO? Chat on WhatsApp.
Want an expert to do this for you?
I’m Maroof Ahmed, a freelance SEO consultant with 300+ projects for businesses in the USA, UK and Australia. Technical SEO services →
