Latest
How to Turn Your Expertise Into a Book People Want to Read | The Expert MethodWhat’s New at The Writing King: Week of October 25, 2026Challenger Remembrance Day: The Engineer Who Wouldn’t SignJoel Salomon: The Truth About MoneyReddit Is Putting Up a Login Wall. Wikipedia Won’t Be Far Behind.Victoria Chemko: The Body Is the First TechnologySir Patrick Stewart: A TributeA Yale Economist Says We Won’t Be Missed. He Forgot the Bread Line.Walter Koenig: A TributeI Don’t Post Bad ARC Reviews. I Send the Author a Note.AI Has Paid Off Outside Tech. Apollo Is Reading the Wrong Scoreboard.The Little Red Book of Stuff That Works!Your Kids Are Your Own FaultGrow a PairYou’re Broke Because You Want to BeIt’s Called Work for a Reason!No Time for TactShut Up, Stop Whining, and Get a LifeWilliam Bessette: AI Enablement and Child Welfare TechnologyFree Book Planning ToolsWhat’s New at The Writing King: Week of October 18, 2026Ghostwriting by the Numbers: Timelines, Word Counts and the First CallPromising Young Woman (2020) ReviewBillions for AI, Pennies for the Plumbing: AI Companies Should Pay to Keep PHP AlivePHP2Shell: AI Found a 22-Year-Old Crack Under Your Website in Two DaysKindle Unlimited Is Now Kindle+. AI Audiobooks Just Joined the BuffetPetrov Day: The Officer Who Didn’t Believe the ComputerMo Gawdat Says the AI Dystopia Starts in 2027. Read the List, Skip the DatesWhen to Quit Writing a Book: I’ve Abandoned Dozens, and I’d Do It AgainThe Society of Authors Signed an Ethical AI Charter, Then Ran From It in Eight DaysChina Is Using Bots to Fan the Data Center Backlash. The Backlash Is Still Real.Getty Images Filed for Bankruptcy. Can You Prove You Licensed Your Book’s Images?Fluff Words: Cut Them From Your Prose, Keep Them in Your DialogueWhere Can Writers Learn Storytelling From Movies? Richard Lowe Publishes 1,226 Film and TV Reviews With Writing Craft NotesWhere Are the Independent Bookstores and Public Libraries Worth Visiting in Tampa Bay? Author Richard Lowe Profiles 44 of ThemWhat Should You Know Before Hiring a Ghostwriter? The Writing King Publishes 57 New Answers, Including What to Do When It Goes WrongWhere Can You Hear Founders and Executives Tell Their Own Stories? Richard Lowe’s Leaders and Their Stories Publishes Every Unscripted Interview With a Full TranscriptAuthor Richard Lowe Publishes Eight Volumes of Enemies of You, a Researched Series on the Forces Working Against Ordinary AmericansThe Jackal (1997) ReviewThe Day of the Jackal (2024) ReviewYour First Novel Is an Apprentice Piece: What Beta Readers and Editors Can’t FixWhen the Cloud Gets Bombed: What the AWS Data Center Strikes Teach About BackupsHuman-Written Book Labels Are Gatekeeping With a FeeThe Enshittification of Microsoft Office: Why I Switched to a Free CloneGlobal Encryption Day: The Padlock Every Writer Depends OnWriting Your Worst Moments in a Memoir: Show the Evidence, Skip the VerdictHow to Register a Copyright for Your Book (and What Doesn’t Count)Your AI Chats Aren’t Private: Deleted ChatGPT Logs in CourtThe Board Seat Scam: A 419 Letter in a Business SuitI Joined the Science Fiction Book Club 30 Times
The Writing King Your Ethical Ghostwriter. Your Story, Done Right.

Robots.txt: The Most Dangerous File on Your Website and How to Configure It Without Destroying Your Search Rankings

TL;DR: I once accidentally told every search engine on Earth to ignore my entire website. One wrong line in robots.txt and my site vanished from Google. I caught it fast, but unmonitored it could have stayed gone for weeks. Robots.txt is the most powerful and dangerous file most site owners have never heard of. Configured right it protects private areas; configured wrong it erases your online presence overnight.

I once accidentally told every search engine on Earth to ignore my entire website. One wrong line in a file called robots.txt, and my site disappeared from Google.

I caught it fast, but if I hadn’t been monitoring, it could have stayed that way for weeks. These kinds of mistakes took minutes to make and could take months to recover from.

Robots.txt is the most powerful and dangerous file most website owners have never heard of. It controls whether search engines can see your content. Configured correctly, it protects private areas while letting Google index everything that matters. Configured incorrectly, it can erase your entire online presence overnight. There’s more on this in the technology of writing hub.

I think robots.txt deserves a lot more fear than it gets. Site owners obsess over fonts and page builders and never look at the one file that can switch off their search traffic, and too many SEO plugins and hosting dashboards let you change it without a word of warning about what you just did.

What Does Robots.txt Do?

When search engines visit your website, they check a file at yoursite.com/robots.txt before crawling anything else. This file contains instructions about which parts of your site they’re allowed to access. It follows the Robots Exclusion Protocol, which every major search engine respects. For more, see your web designer wrote your website copy and it shows and wordPress reality.

Configured right it protects private areas; configured wrong it erases your online presence overnight.
Share on X

A properly configured robots.txt file directs search engines to your important content while keeping them away from admin areas, private directories, and pages that create duplicate content problems. It can improve your SEO by focusing crawl resources on the pages that matter. Get it wrong and it can destroy your search visibility.

Robots.txt is the most powerful and dangerous file most website owners have never heard of.

The critical thing to understand: robots.txt is a polite request with no enforcement behind it. Legitimate search engines follow these rules. Malicious bots, scrapers, and hackers ignore them completely. If you need actual security for sensitive content, use password protection or server-level blocks. I’ve lost patience with advice that calls robots.txt a way to hide private pages, because listing a private directory in a public file hands its location to every scraper that reads it.

How Do Robots.txt Mistakes Happen?

Every character in a robots.txt file matters. The difference between blocking your admin folder and blocking your entire website is a single word:

Disallow: /wp-admin/ blocks your admin folder. Correct.

Disallow: / blocks your entire website. Catastrophic.

The robots.txt control panelA hand-drawn control panel titled The robots.txt control panel, the two buttons are one word apart. A small green button reads Disallow: /wp-admin/ and its label says it hides the admin folder, which is correct. Next to it is a huge red button that reads Disallow: /, labeled turns off all search traffic, with notes saying there is no safety cover, no confirmation dialog, and that it takes seconds to press and months to recover from. A gauge labeled search traffic shows the needle resting on zero, with the words after one press.The robots.txt control panel(the two buttons are one word apart)OKDisallow: /wp-admin/Hides the admin folder.Correct.Disallow: /TURNS OFF ALL SEARCH TRAFFICSafety cover: noneConfirmation dialog:also noneTime to press: seconds. Time to recover: months.0lotsSEARCH TRAFFIC(after one press)
The robots.txt control panelA hand-drawn control panel titled The robots.txt control panel, the two buttons are one word apart. A small green button reads Disallow: /wp-admin/ and its label says it hides the admin folder, which is correct. Next to it is a huge red button that reads Disallow: /, labeled turns off all search traffic, with notes saying there is no safety cover, no confirmation dialog, and that it takes seconds to press and months to recover from. A gauge labeled search traffic shows the needle resting on zero, with the words after one press.The robots.txt control panel(the two buttons areone word apart)Safety cover:noneConfirmationdialog: noneDisallow: /TURNS OFF ALL SEARCH TRAFFICSeconds to press. Months to recover.OKDisallow: /wp-admin/Hides admin.Correct.SEARCH TRAFFIC0lots(after one press)

The book on this: The Day Your Website Died is forty-two chapters on how answer engines decide who gets named, and what to do about it.

Other common mistakes: blocking /blog/ when you meant to block /blog/drafts/, forgetting that paths are case sensitive, and deploying a development robots.txt file to your live site. Each can remove pages or whole sections from search results, and recovery takes far longer than the mistake took to make. That last one makes me angriest, because the site owner eats the traffic loss for a launch process somebody else built without a single check in it.

What does a safe robots.txt file look like?

Basic WordPress Site

User-agent: *
Disallow: /wp-admin/
Disallow: /wp-includes/
Allow: /wp-admin/admin-ajax.php

Sitemap: https://yoursite.com/sitemap.xml

This blocks WordPress admin areas that shouldn’t be indexed while allowing a necessary AJAX file. Conservative and safe. Start here.

Small Business Site

User-agent: *
Disallow: /admin/
Disallow: /private/
Disallow: /temp/

Sitemap: https://yourbusiness.com/sitemap.xml

Protects admin areas and private content while leaving all public pages accessible.

E-commerce Site

User-agent: *
Disallow: /cart/
Disallow: /checkout/
Disallow: /account/
Disallow: /search?

Sitemap: https://yourstore.com/sitemap.xml

Blocks transactional pages that create duplicate content issues while protecting customer data.

Development Site (Temporary)

User-agent: *
Disallow: /

Sitemap: https://devsite.com/sitemap.xml

Blocks everything. Use only on development sites. Remove immediately when going live. This is the line that will destroy your search visibility if it accidentally ends up on your production site.

Advanced Techniques

Targeting Specific Search Engines

User-agent: Googlebot
Disallow: /premium-content/

User-agent: AhrefsBot
Disallow: /

User-agent: *
Disallow: /admin/

Different rules for different crawlers. This example blocks aggressive SEO tool crawlers entirely while allowing Google access to most content.

Pattern Blocking with Wildcards

User-agent: *
Disallow: /*?print=
Disallow: /*&utm_source=
Disallow: /category/*/page/

Blocks URL patterns that create duplicate content or waste crawl budget without blocking individual pages.

How Do You Control AI Crawlers With Robots.txt?

Robots.txt is evolving to address AI-powered bots that scrape content for training language models and generating AI answers. This is a rapidly changing area, but there are already practical directives you can use.

Google and Apple have introduced specific user agents for their AI training crawlers, separate from their search crawlers. This means you can block AI training without affecting your search visibility:

User-agent: Google-Extended
Disallow: /

User-agent: Applebot-Extended
Disallow: /

These directives tell Google and Apple not to use your content for AI model training while still allowing their regular search crawlers to index your site normally.

Cloudflare has expanded robots.txt further with Content-Signal directives that provide granular control over how AI bots use your content. These include search=yes/no to control whether content can build search indexes, ai-input=yes/no to determine if content can be used as input for AI-generated answers like chatbot responses, and ai-train=yes/no to block or allow content for training AI models. The defaults are search=yes, ai-train=no, and ai-input=neutral until the site owner sets them.

Emerging standards like llms.txt and tools like Spawning’s Don’t Train protocol offer additional layers of control at the content level instead of the site level.

The critical caveat: no part of robots.txt binds every bot. That applies to every directive in the file, AI-specific or otherwise, and AI companies may ignore them entirely. These directives work mostly as legal reservations of rights and best-effort signals, so combine them with firewalls and access controls if you’re serious about preventing AI scraping. The burden should never fall on site owners at all. The companies scraping the content should have to ask first, and too many of them have decided not to bother. (See also how Reddit is answering the scrapers with a login wall)

Tools for controlling AI crawlers, and what each controls
Directive or tool What it controls
User-agent: Google-Extended Blocks Google from using your content for AI training; search crawling continues
User-agent: Applebot-Extended Blocks Apple from using your content for AI training; search crawling continues
Content-Signal search=yes/no Whether content can build search indexes (default yes)
Content-Signal ai-input=yes/no Whether content can feed AI-generated answers (neutral until set)
Content-Signal ai-train=yes/no Whether content can train AI models (default no)
llms.txt and Spawning’s Don’t Train Control at the content level instead of the site level
Firewalls and access controls The only real barrier, since no directive binds every bot

How do you test a robots.txt file?

Never upload a robots.txt file without testing it first. Use the robots.txt report in Google Search Console to check syntax and verify that your rules do what you intend. Test multiple URLs, including your homepage, your most important content pages, and the pages you’re trying to block. Verify that your sitemap location is correct.

Back up your current robots.txt file before making changes. Start with minimal restrictions and add rules gradually. Upload during low-traffic hours. Monitor crawl errors and traffic data for at least 48 hours after any change. If something looks wrong, revert to your backup immediately.

When Something Goes Wrong

If you discover a robots.txt error that’s blocking content from search engines, fix the file immediately. Then request a re-crawl in Google Search Console and resubmit your sitemap. Monitor crawl errors daily for the first week. Check the indexing status of pages that were blocked. Submit individual URLs for re-indexing if necessary.

Recovery time depends on how long the error was live and how much content was affected. A few hours of blocking might resolve within days. Weeks of blocking can take months to fully recover from. The longer bad directives stay in place, the more damage they cause and the longer the recovery takes. For more, see protecting your site with backups.

Google has finally put rough numbers on the wait. At Search Central Live in Barcelona on October 2, 2026, Gary Illyes walked through typical and worst-case timings, and Search Engine Journal reported them from an attendee’s recap.

A page Google already knows about typically gets recrawled in about 30 days. A sitemap is usually processed within a day but can take up to two weeks. Indexing itself takes about an hour and a half once Google gets around to the page.

The slow end of those ranges runs to months, and sometimes to never. So after you fix the file and resubmit the sitemap, give it a month before you panic, and expect the pages Google rarely visited to come back last. I went through the full set of numbers in how long Google takes to crawl, index and recover.

WordPress Specifics

WordPress automatically generates a basic robots.txt file with minimal protection for admin areas.

This default is safe but basic. Most serious WordPress sites benefit from a customized file. My WordPress help for writers exists for exactly this. SEO plugins like SEOpress let you edit robots.txt directly from your admin dashboard. That makes changes easier but also easier to break.

Don’t block /wp-content/uploads/ where your images are stored. Blocking this directory kills your image SEO. Do block /wp-admin/ and /wp-includes/. Always allow /wp-admin/admin-ajax.php which WordPress needs for core functionality.

My take

Leave robots.txt alone unless you need to block something specific, and test every change before it goes live. One wrong line can pull your whole site out of Google. Back up the current file, check your key URLs in Search Console, and watch crawl data for two days after. If you break it, fix it, resubmit the sitemap and give it a month before you panic. Don’t block your uploads folder.

The Point

Most successful websites use conservative robots.txt files that protect obvious admin areas and leave everything else accessible. The goal is a file that safely serves your business without risking the kind of mistake that removes your site from search results.

Start simple, test everything, and watch your traffic after every change. When in doubt, allow access and accept a little wasted crawling over the risk of blocking important content. I’d take a boring robots.txt file over a clever one every time, because the clever ones are the files that wipe out a business’s search traffic while nobody’s watching, and the owner is the one who pays for it.

Robots.txt Frequently Asked Questions

What happens if I make a robots.txt mistake?
Minor errors might block important pages from search results. Major mistakes like adding “Disallow: /” can remove your entire website from Google. Recovery can take weeks or months depending on how long the error was live. Always test your robots.txt file before uploading it to your live website.
How do I test my robots.txt file safely?
Use the robots.txt report in Google Search Console to check syntax and verify that your rules work as expected. Test multiple URLs including your homepage and important content pages. Back up your current file before making changes, and monitor crawl errors and traffic for at least 48 hours after any change.
Can robots.txt block my entire website from search engines?
Yes. Adding “Disallow: /” tells all search engines to ignore your entire site. This single line can make your website invisible in search results. It’s the most common catastrophic robots.txt mistake and the easiest to make accidentally.
What should be in a basic robots.txt file for WordPress?
Block /wp-admin/ and /wp-includes/ directories, allow /wp-admin/admin-ajax.php for core functionality, and include your sitemap location. Don’t block /wp-content/uploads/ where your images are stored. Start simple and add restrictions gradually.
Do all search engines follow robots.txt rules?
Legitimate search engines like Google, Bing, and Yahoo follow robots.txt rules voluntarily. Malicious bots, scrapers, and hackers ignore them. Robots.txt should never be used as a security measure for sensitive content. Use password protection or server-level blocks for real privacy.
How long does it take for robots.txt changes to take effect?
Changes take effect when search engine crawlers next visit your site, but the full impact on rankings may take days or weeks. You can speed up the process by requesting a re-crawl in Google Search Console. Recovery from accidental blocking can take weeks or months depending on the duration and scope of the error.

From the author
The Day Your Website Died by Richard Lowe

The Day Your Website Died
One wrong line can hide a site from search, and AI search changed the rules again. The Day Your Website Died is my book on optimizing for that new kind of traffic.

About the Author
Richard Lowe, professional ghostwriter

Richard Lowe is a professional ghostwriter and author with 113+ books authored and 54+ ghostwritten. Before writing full time he spent 33 years in enterprise technology, including 20 years as Director of Computer Operations and Technical Services at Trader Joe's. He writes nonfiction, fiction and memoir, and works with executives and experts on books that build authority.

More about Richard Lowe →

Disclaimer

The views and opinions expressed in this blog post are solely those of Richard Lowe and are based on personal experience and research. This content is for informational purposes only and should not be construed as professional legal, financial, accounting, or business advice. Always consult with qualified professionals before making important business or legal decisions. Richard Lowe is not a lawyer, accountant, or licensed professional advisor, and this content does not establish any professional relationship.

0 comments

No comments yet. Yours can be the first.

Was this useful?

Leave a comment