What Is Robots.txt and Do I Need One?
Robots.txt tells search engine crawlers which parts of your site to avoid. Learn what it does, a safe basic example, and the costly mistakes to watch for.

Short answer: Robots.txt is a small text file at the root of your website that tells search engine crawlers which areas they should not crawl. Most small business sites only need a very simple one, and the biggest risk is accidentally blocking your whole site from Google.
Where it lives
It always sits at yourdomain.com/robots.txt. You can type that address into your browser right now to see yours. If you get a 404 error, you do not have one, which is not a disaster: crawlers will simply assume they can visit everything.
What a basic robots.txt looks like
User-agent: *Disallow:Sitemap: https://www.example.com/sitemap.xml
In plain English: all crawlers are allowed everywhere, and here is where the sitemap is. For most small sites, that is all you need.
The key lines explained
- User-agent: which crawler the rule applies to. An asterisk means all of them.
- Disallow: a path crawlers should not visit. Empty means nothing is blocked.
- Allow: an exception inside a blocked folder.
- Sitemap: the address of your XML sitemap.
The mistake that wipes sites off Google
This single line blocks everything:
Disallow: /
Developers sometimes add it while building a site to keep it hidden, then forget to remove it at launch. If your new site has not appeared on Google after weeks, check this first. Also check your platform settings: WordPress has a 'Discourage search engines' box that does something similar.
We check robots.txt, sitemaps and indexing on every launch. Explore SiteDrum plans.
SiteDrum builds fast, mobile-first websites from $99 setup and $15 a month, with hosting, security, Google setup and support included. Already have a site that is slow or broken? Try Website Rescue or run our free speed test.
What robots.txt does not do
- It does not hide pages from search results reliably. A blocked page can still appear in Google if other sites link to it, just without a description. To keep a page out, use a
noindextag and let Google crawl it. - It is not security. The file is public, and bad bots ignore it. Never use it to hide private areas. Use passwords instead.
Sensible things to block
- Admin areas, like
/wp-admin/(WordPress typically allows a specific file inside it). - Internal search result pages that create endless duplicate URLs.
- Shopping basket and checkout steps.
Never block your CSS or JavaScript files. Google needs them to see your pages properly.
What about AI crawlers?
Some business owners use robots.txt to opt out of certain AI crawlers by naming their user agents. Whether you want to is a business decision: blocking them may reduce how often AI tools can reference your site.
How to test yours
Google Search Console has a robots.txt report showing the version Google last fetched and any errors. You can also use URL Inspection on a page to see if it is blocked. If something looks wrong and you are not sure how to fix it, ask us.
The bottom line
Robots.txt is a short instruction file for crawlers. Keep yours simple, point it to your sitemap, never block the whole site by accident, and remember it is not a privacy tool.
Frequently asked questions
Do I need a robots.txt file?
It is not required, but a simple one pointing to your sitemap is good practice.
Can robots.txt remove a page from Google?
Not reliably. Use a noindex tag, or Search Console's removals tool for urgent cases.
Why is my site not on Google?
One common cause is a robots.txt line saying Disallow: / left over from development.
Is robots.txt case sensitive?
Paths in it are case sensitive, so /Admin and /admin are treated differently.
Want a website that brings you customers?
Tell us what you do on WhatsApp and we will send a fixed quote and a free mockup.
Get my free mockupRelated guides
Our products
Website design near you
Website design in LondonWebsite design in New YorkWebsite design in TorontoWebsite design in EdinburghWebsite design in PhoenixWebsite design in DublinWebsite design in AntwerpWebsite design in MiamiWebsite design in BergenWebsite design in SydneyAll cities →
SiteDrum home · All guides · Sitemap · Contact us
All guides
- Do You Have to Pay for a Website Monthly? What the Fees Actually Cover
- Are Websites Expensive? An Honest Breakdown for Small Businesses
- How Much Does a Website Cost Per Month? Hosting, Plans and Hidden Extras
- How Much Should I Pay for a Website? A Fair Price Guide
- Is It Worth Paying for a Website for Your Business?
- How Much Does Website Hosting Cost? Shared, Managed and Edge Hosting Explained
- Do I Need a Website for My Small Business in 2026?
- Are Websites Still Necessary Now That We Have Social Media and AI?
- Do I Need a Website to Get Google Reviews?
- Do I Need a Website to Run Google Ads?
- Can I Build My Own Website for My Business? Pros, Cons and Hidden Costs
- Can I Build a Website With AI? What AI Builders Can and Cannot Do
- Can I Create a Website on My Phone? Yes, Here Is How
- Is Wix Good for Small Business? Honest Pros and Cons
- Do You Have to Pay to Be on Google? Free vs Paid Visibility
- How Long Does It Take for a New Website to Show Up on Google?
- How Do I Get My Website on the First Page of Google?
- What Is Website Hosting? A Plain-English Explanation
- Can You Have a Website Without Hosting?
- Do I Need a Cookie Banner on My Website?
- How Much Does It Cost to Maintain a Website Each Year?
- How Much Do Web Designers Charge? Hourly, Project and Monthly Pricing
- How Much Does an Ecommerce Website Cost for a Small Shop?
- How Much Does a One-Page Website Cost? Is It Enough?
- Is Squarespace Good for Small Business? Pros, Cons and Alternatives
- WordPress vs Website Builders: Which Is Better for a Small Business?
- Can I Make My Own Website for Free? What You Get and What You Give Up
- How to Make a Website for Your Business: Step by Step
- How Do I Get My Business on Google? Setting Up and Verifying Your Profile
- Why Is My Business Not Showing on Google Maps?
- How Do I Get More Traffic to My Business Website?
- What Is SEO and Does My Small Business Need It?
- Do I Need a Domain Name for My Website?
- What Is the Difference Between a Domain, Hosting and a Website?
- Do I Need an SSL Certificate for My Website?
- How Do I Get a Business Email Address With My Domain?
- Do I Need a Website If I Have a Facebook Page?
- How Many Pages Should a Small Business Website Have?
- What Makes a Good Small Business Website? 12 Must-Haves
- Why Is My Website So Slow? Common Causes and Fixes
- How Long Does It Take to Build a Website for a Small Business?
- What Should Be on the Homepage of a Business Website?
- How Do I Write Website Content for My Business?
- Do I Need a Privacy Policy on My Website?
- How Do I Add WhatsApp to My Website?
- How Do I Add Online Booking to My Website?
- How Do I Take Payments on My Website?
- Is GoDaddy Website Builder Good for Small Business?
- Do I Need a Website If I Have Shopify?
- How Do I Show Google Reviews on My Website?
- How Do I Check If My Website Is Mobile Friendly?
- What Is a Landing Page and Do I Need One?
- How Do I Redesign My Website Without Losing SEO?
- How Much Does a Website Redesign Cost?
- What Is Google Search Console and How Do I Use It?
- How Do I Get My Business Recommended by ChatGPT and AI Search?
- How Do I Protect My Website From Hackers?
- What Is a CMS and Do I Need One for My Website?
- How Do I Choose a Good Domain Name for My Business?
- Does a Cleaning Business Need a Website? What to Include
- Does a Plumber Need a Website? What Wins Emergency Callouts
- Website for Electricians: What to Include to Win More Jobs
- Website for Dentists: What a Dental Practice Website Needs
- Website for Personal Trainers: Win More Clients Online
- Website for Photographers: Portfolio Sites That Get Bookings
- Website for Landscapers and Gardeners: Get More Local Jobs
- Website for Roofers: Turn Leaks Into Leads
- Website for Nail and Beauty Salons: Fill Your Booking Diary
- Website for Cafes and Coffee Shops: What You Actually Need
- Website for Builders and Construction Companies
- How Do I Get More Leads From My Website?
- Why Is My Website Not Getting Any Enquiries?
- How Do I Make My Website Look More Professional?
- Should I Put Prices on My Website?
- How Do I Update My Website Myself?
- Do I Need Google Analytics on My Small Business Website?
- Can I Move My Website to Another Host or Provider?
- Who Owns My Website and Domain? Protect Your Business
- What Are Meta Titles and Descriptions and How Do I Write Them?
- Do I Need a Blog on My Business Website?
- Does a Small Law Firm Need a Website? What Solicitors Should Include
- Do Estate Agents Need Their Own Website If They Use the Big Portals?
- Does a Car Mechanic or Garage Need a Website? What Drivers Look For
- Does a Driving Instructor Need a Website? A Practical Guide
- Does a Private Tutor or Tuition Centre Need a Website?
- Does a Dog Groomer Need a Website? What Pet Owners Want to See
- Does a Florist Need a Website, or Is Instagram Enough?
- Does a Bakery or Home Cake Maker Need a Website?
- Does a Small Hotel, B&B or Guest House Need Its Own Website?
- Does a Wedding Planner Need a Website? What Couples Look For
- Does a Therapist or Counsellor Need a Website? A Private Practice Guide
- Does a Physio or Chiropractor Need a Website? What Patients Check First
- Does a Removal Company Need a Website? Winning Quotes Online
- Does a Painter and Decorator Need a Website? A Tradesperson's Guide
- Does a Locksmith Need a Website? Standing Out From Rogue Call Centres
- Does a Pest Control Business Need a Website? What to Include
- Does a Makeup Artist Need a Website if They Have Instagram?
- Does a Yoga or Pilates Studio Need a Website? What to Include
- Does a Catering Business Need a Website? Menus, Quotes and Trust
- Does a Consultant or Coach Need a Website, or Is LinkedIn Enough?
- How Much Does a Website Cost in the UK?
- How Much Does a Website Cost in the USA?
- How Much Does a Website Cost in Canada?
- How Much Does a Website Cost in Australia?
- How Much Does a WordPress Website Cost?
- How Much Does Wix Cost per Month (and What Are the Hidden Extras)?
- How Much Does Squarespace Cost?
- How Much Does Shopify Cost per Month?
- How Much Does a Logo Cost for a Small Business?
- How Much Does SEO Cost per Month?
- How Much Do Google Ads Cost for a Small Business?
- How Much Does Professional Website Photography Cost?
- How Much Does Website Copywriting Cost?
- Why Is My Domain Renewal So Expensive?
- How Much Does an Online Booking System Cost?
- What Are the Hidden Costs of Website Builders?
- Monthly Website Plan vs One-Off Payment: Which Is Better?
- How Much Should a Startup Spend on a Website?
- How Much Does It Cost to Fix a Broken Website?
- How Much Does a Landing Page Cost?
- What Should Be on a Local SEO Checklist for a Small Business?
- How Do I Rank Higher on Google Maps?
- How Many Google Reviews Do I Need?
- How Should I Respond to Bad Google Reviews?
- Should I Post on My Google Business Profile?
- What Is NAP Consistency and Why Does It Matter?
- How Do Small Businesses Get Backlinks?
- How Do I Submit My Website to Google?
- What Is an XML Sitemap and Do I Need One?
- How Do I Do Keyword Research for Free?
- What Is Domain Authority and Does It Matter?
- Why Did My Google Rankings Drop?
- How Do Near Me Searches Work on Google?
- How Do I Choose Google Business Profile Categories?
- How Long Does SEO Take to Work?
- Is SEO Worth It for a Small Business?
- What Is a Google Penalty and How Do I Recover?
- How Do I Get Listed on Bing Places and Apple Business Connect?
- How Do I Track My Google Rankings for Free?
- What Is a Favicon and Do I Need One for My Website?
- What Is a 404 Page and How Do I Fix 404 Errors on My Website?
- What Is Website Uptime and How Much Should I Expect?
- What Is a CDN and Does My Small Business Website Need One?
- What Is DNS and Why Does It Matter for My Website?
- How Do I Connect My Domain Name to My Website?
- What Is Website Accessibility and What Is WCAG?
- What Is a Staging Site and Do I Need One?
- How Do I Back Up My Website Properly?
- What Is a Website Builder and Is It Right for My Business?
- Static vs Dynamic Websites: What Is the Difference?
- What Does GDPR Mean for My Small Business Website?
- Do I Need Terms and Conditions on My Website?
- How Do I Add a Contact Form to My Website?
- How Do I Stop Spam on My Website Contact Form?
- Why Does My Website Say Not Secure and How Do I Fix It?
- How Do I Optimise Images for My Website?
- What Is Alt Text and How Do I Write It for My Website?
- What Is a Redirect? 301 vs 302 Explained
- What Is Website Caching and How Does It Speed Up My Site?
- How Do I Promote My Business Website? 12 Practical Ways That Work
- Website or Social Media: Which Is Better for a Small Business?
- How to Use LinkedIn to Get Website Traffic for Your Business
- Is Email Marketing Worth It for a Small Business? An Honest Look
- How to Get Your First Customers Online: A Step by Step Plan
- How to Write an About Us Page That Makes Customers Trust You
- How to Write a Service Page That Converts Visitors Into Enquiries
- Call to Action Examples for Small Business Websites (Plus What Makes Them Work)
- How to Get Testimonials From Customers (Without Feeling Awkward)
- How to Write a Case Study for Your Small Business Website
- Blog Post Ideas for Small Businesses: 40 Topics That Bring Customers
- How Often Should I Update My Website? A Simple Schedule for Small Businesses
- Website Launch Checklist: 30 Things to Check Before You Go Live
- Should I Use Stock Photos on My Website? Pros, Cons and Better Options
- What Colours Should I Use for My Business Website?
- What Fonts Should I Use on My Website? A Simple Guide for Small Businesses
- How to Make My Website Trustworthy: 15 Trust Signals Customers Look For
- Common Website Mistakes Small Businesses Make (And How to Fix Each One)
- How to Use a QR Code to Send People to My Website
- How to Measure If My Website Is Working: The Numbers That Actually Matter
- Core Web Vitals Explained: LCP, INP and CLS for Business Websites
- Static Sites vs WordPress in 2026: Edge Hosting, Speed and Security
- Modern Website Architecture: URL Structure, Silos and Internal Linking
- Schema Markup and AI Search: Structured Data for Modern Websites
- Modern Responsive Web Design: Mobile First, Fluid Layouts and Container Queries
- How to Choose a Web Designer for Your Small Business: 12 Questions to Ask
- Website for Hair Salons and Barbers: What Actually Brings Bookings
- Restaurant Website Essentials: Menus, Bookings and Google in 2026
- Websites for Plumbers, Electricians and Builders: How to Win Local Jobs
- Local SEO for Small Business: The Complete 2026 Guide
- How to Optimise Your Google Business Profile (and Get More Calls)
- Wix vs Squarespace vs a Web Designer: Which Is Right for Your Business?
- How to Fix a Hacked Website: Step by Step Recovery Guide
- Why Website Speed Matters (and How to Fix a Slow Site)
- How to Get More Google Reviews for Your Small Business
- Starting an Online Shop: Ecommerce Website Guide for Small Businesses
- How Much Does a Small Business Website Cost in 2026?
- Do I Need a Website If I Have Instagram?
- How to Get Your Business on Google Maps (Step by Step)
- WhatsApp or Website: Which Is Better for My Business?
- How Much Does a Domain Name Cost? A Plain-English Guide
- Free Website for My Business: Is It Worth It?
- What to Put on a Small Business Website: The Complete Checklist
- Why Is My Website Not Showing on Google? (And How to Fix It)