Skip to main content
Founder-Led · Practicing Since 1997 You work directly with Tony Paris, the founder, same person from quote to launch. No sales reps. No account managers.
SEO

Writing and Testing Your Robots.txt File, Step by Step

Tony Paris
March 9, 2026
7 min read min read

Schedule a Consultation

Choose your preferred meeting type

29
Years in Business
BBB Accredited
600+
Websites Built & Hosted
Star Rated

Configuring robots.txt comes down to a short sequence: place the file, learn the directives, write your rules, decide on AI crawlers and test the result. The file is small, yet one wrong line can stop search engines from crawling your entire site or expose content you meant to keep private.

Step 1: Put the file at your domain root

When a search engine bot reaches your site, it looks for robots.txt at the root of the domain before anything else. The file lists which bots may visit which parts of the site, and well-behaved crawlers follow it, although compliance is voluntary.

Step 2: Learn the four core directives

  • User-agent: names the crawler a group of rules applies to.
  • Disallow: blocks a specific path.
  • Allow: opens a specific path inside a directory you have disallowed.
  • Sitemap: points crawlers to your XML sitemap.

These four cover nearly everything a typical business website needs.

Step 3: Block the areas that should stay out

Most business sites follow the same pattern. Block admin areas and login pages, internal search result pages, duplicate content variations and any development or staging directories, while leaving every important content page open and listing your sitemap location.

Step 4: Decide how to treat AI crawlers

AI crawlers have given robots.txt a bigger role. Many sites now add rules for AI training crawlers such as GPTBot and Google-Extended, and choosing which ones to allow or block has become a real business decision.

Step 5: Test the rules before and after you publish

Check your configuration with the robots.txt tester in Google Search Console, and run specific URLs against your rules to confirm that key pages stay reachable and private pages stay blocked. After any change, watch your crawl stats and indexing reports for surprises.

Step 6: Use noindex where blocking is not enough

Robots.txt rules stop crawling, yet they do not always keep a page out of search results. For pages that must never appear, add a noindex meta tag or an X-Robots-Tag header alongside your robots.txt rules.

Tags

robots.txt technical SEO search crawling website configuration
TP

Tony Paris

Founder and Tech Wizard at AppWT Web & AI Solutions. With over 29 years of experience in web development, Tony helps businesses succeed online through custom websites, SEO, and AI integration.

Learn more about Tony

Frequently Asked Questions

Where does the file go in the first step?

Robots.txt is a plain text file that sits at the root of your domain. It tells web crawlers which pages or sections they may or may not visit, and it is the first file a search engine bot reads before it crawls the site.

Will a Disallow rule keep a page out of search results?

Not always. Robots.txt stops crawling but not indexing, so Google may still index a blocked URL that other sites link to, even without reading its content. To keep a page out of the index, pair robots.txt with a noindex meta tag or an X-Robots-Tag header.

What goes wrong if I skip the testing step?

A bad rule can block important pages from crawling and indexing, hide the whole site from search engines, or open private areas to crawlers. Test every change with care and watch your indexing reports afterward.

Enjoyed this article?

Share it with your network

Ready to Get Started?

Contact us today for a free consultation. Let's discuss your project.

Contact Us View Services

Share This Article

Awards & Recognition

Tech Wizards an AppWT Anthem

Accessibility

by AppWT Web & AI Solutions
🛡️ Accessibility Profiles
📝 Content Adjustments
100%
100%
1.4
0px
🎨 Color Adjustments
100%
🎛️ Orientation & Controls
♿

Accessibility Statement

Our commitment to digital accessibility and inclusive design

Our Commitment to Accessibility

AppWT Web & AI Solutions is committed to ensuring digital accessibility for people with disabilities. We continually improve the user experience for everyone and apply the relevant accessibility standards to achieve these goals.

Conformance Status

The Web Content Accessibility Guidelines (WCAG) defines requirements for designers and developers to improve accessibility for people with disabilities. It defines three levels of conformance: Level A, Level AA, and Level AAA.

AppWT Web & AI Solutions is partially conformant with WCAG 2.1 level AA. Partially conformant means that some parts of the content do not fully conform to the accessibility standard.

Accessibility Features

  • Built-in accessibility toolbar with multiple customization options
  • Keyboard navigation support throughout the website
  • Screen reader compatibility and proper ARIA labels
  • High contrast mode and color customization options
  • Text size adjustment and font modification capabilities
  • Reading guide and focus indicators for improved navigation
  • Alternative text for all images and media
  • Semantic HTML structure for better screen reader interpretation

Technical Specifications

Accessibility of AppWT Web & AI Solutions relies on the following technologies to work with the particular combination of web browser and any assistive technologies or plugins installed on your computer:

  • HTML
  • WAI-ARIA
  • CSS
  • JavaScript

These technologies are relied upon for conformance with the accessibility standards used.

Feedback

We welcome your feedback on the accessibility of AppWT Web & AI Solutions. Please let us know if you encounter accessibility barriers:

Phone: (888) 565-0171

Email: sales@appwt.com

Address: 33300 Five Mile Rd, Livonia, MI 48154 (by Appointment Only)

Assessment Approach

AppWT Web & AI Solutions assessed the accessibility of our website by the following approaches:

  • Self-evaluation
  • External evaluation
  • Automated testing tools
  • Manual testing with assistive technologies

Date

This statement was created on January 15, 2025 using the W3C Accessibility Statement Generator Tool.

Last updated: