Skip to content

Separating AI bots by folder with robots.txt: open /blog and block /admin

robots.txt ile blog klasörünü açıp admin klasörünü kapatmayı anlatan teknik şema

On an e-commerce site, your team is growing the /blog folder for new product guides, while the admin panel lives under /admin. Then you check the logs: some bots are crawling content pages and also trying to touch admin paths you never intended to expose. In that kind of setup, a folder- and path-based access policy is a much cleaner solution than a blunt “block everything” approach.

Short answer: the purpose of robots.txt AI bot management is to tell search engines and AI crawlers which paths they may crawl; for example, you can keep public content such as /blog/ open while blocking /admin/, /account/, or test folders. But robots.txt is not a firewall; it only provides crawling instructions. To truly protect private areas, you need authentication, authorization, and server-level access controls.

Why should robots.txt AI bot management be done by folder?

AI search engines and classic crawlers do not behave the same way; some crawl very frequently, while others are more aggressive with certain file types. That is why “block the whole site” is often unnecessary. A good setup shows bots only the areas you want indexed and crawled. This gives you more controlled content discovery while keeping admin panels, cart flows, filtered parameter pages, and internal tools out of crawl load.

The most important distinction here is this: crawl permission and access security are not the same thing. Robots.txt is meant for well-behaved bots that follow the rules. Malicious clients can ignore the file. So when you configure AI bot access, use robots.txt for visibility management and use the server, application, and CDN layers for protection.

Core logic: how do Allow and Disallow work?

Inside robots.txt, you can open or block specific paths for bots. The most common pattern is to write rules for a user-agent group. The general structure looks like this:

User-agent: *
Disallow: /admin/
Disallow: /account/
Allow: /blog/
Allow: /blog/

Here, User-agent: * applies to all bots. Disallow means the specified path should not be crawled, while Allow means the specified path is permitted. In many cases, Allow is used to narrow a broader block. For example, you can keep /blog/ open while separately blocking /blog/draft/ or private subdirectories.

Example thinking at the folder and path level

Imagine this scenario: the main site should be indexed, blog content should be readable by AI answer engines, but admin, account, and test folders should stay out. In that case, your robots.txt policy is not “block everything” but “open public content, block operational paths.” This kind of structure does not waste crawl budget and also gives search engines a cleaner signal.

Sample robots.txt file for AI bot access

The example below keeps the blog open for general bots while blocking admin areas. If you want, you can also target specific AI bot names separately; but it is safer to write custom rules only for user agents you know and have tested.

User-agent: *
Disallow: /admin/
Disallow: /account/
Disallow: /checkout/
Disallow: /search/
Disallow: /tmp/
Allow: /blog/
Allow: /blog/*

Sitemap: https://www.orneksite.com/sitemap.xml

In this example, /blog/ is left open because it is the main content production area. Paths such as /admin/, /account/, and /checkout/ are blocked for both privacy and to avoid unnecessary crawl load. The Sitemap line also gives bots an extra signal about which URLs matter most.

When should the AI crawler whitelist approach be used?

The “whitelist” approach comes up when you want to give only certain bots more open rules. For example, some publishers may want to allow search engine bots broader access while restricting other bot types. But be careful: bot names change over time, can be spoofed, and different providers may use different user agents. That is why relying on user agents for critical security decisions is not the right approach.

If your goal is to fine-tune AI bot access, start by defining the general rules with User-agent: *. Then, only if you truly need it, add extra blocks for specific bots. For example, you might block one bot entirely while opening the blog to another. But do not publish such rules without testing them in production first; one incorrect rule can reduce the visibility of important content.

What is the difference between Googlebot, AI bots, and classic crawlers?

Technically, they all request URLs over HTTP; however, their crawling goals are not the same. Classic search engines collect content for indexing. AI systems, on the other hand, may try to understand the page text, structure, and contextual relationships. That is why a well-structured /blog area, combined with heading hierarchy, clean permalinks, and a sitemap, provides a more understandable source. By contrast, areas like /admin do not contain content that is valuable for model training or answer generation; they only create risk and load.

Remember this: if a page is blocked with robots.txt but is linked from elsewhere, it can still theoretically appear in search engines; only the content crawl or full text extraction is limited. If you want a page to disappear entirely, you need to consider the noindex meta tag, HTTP headers, and access control together.

Technical checklist

  • First inventory your paths: list folders such as /blog/, /admin/, /account/, /api/, and /tmp/.
  • Separate public content: areas like news, blog, and help center can usually stay open.
  • Block admin areas: /admin/ and similar panels should be closed to crawling in robots.txt.
  • Watch parameterized pages: search, filter, and sort URLs can create unnecessary duplication.
  • Add a sitemap: show priority URLs clearly to bots.
  • Test before going live: one wrong line can affect all site traffic.
  • Do not leave security to robots.txt: use auth and server rules for private areas.

Example scenario: setup with /blog open and /admin blocked

Let’s say you are working on the brand site www.orneksite.com. The content team publishes blog posts, and the team manages the site through /admin/. You can follow the implementation steps below:

  1. Place the robots.txt file in the root directory.
  2. Define general bot behavior with User-agent: *.
  3. Add the paths to block, such as Disallow: /admin/.
  4. Leave the content area open with Allow: /blog/.
  5. Add the important URL list with the Sitemap: line.
  6. In live testing, check requests to /blog/ and /admin/.

The advantage of this structure is simple: bots can easily discover public content while operational areas are removed from the crawl list. If you have private subfolders inside the blog, such as /blog/internal/, you can add another Disallow line for them.

Common mistakes

  • Blocking the whole site: you may accidentally exclude visible pages from crawling too.
  • Delegating security to robots.txt: this file does not hide access; it only gives instructions.
  • Missing the slash difference: /admin and /admin/ can produce different matches in practice.
  • Publishing without testing: especially on large sites, a single line error can have a major impact.
  • Forgetting the sitemap: you lose an extra discovery signal for the content you leave open.

Final decision: what should you open and what should you block?

A solid robots.txt AI bot strategy gives a clear answer to the question, “Which content is public, and which content is operational?” Public content folders such as /blog/ should be open to crawling, while admin, account, cart, test, and temporary folders should be blocked. This approach creates a clean signal for AI bot access and gives you fine-grained control on the crawler-blocking side. But to repeat: robots.txt is not an access-control mechanism; it is a crawling directive.

With the right setup, you can also apply the AI crawler whitelist logic in a controlled way and surface your site’s important content more cleanly. The best results come from using robots.txt, sitemap, noindex, and real security measures together.

Frequently asked questions

Can I completely block AI bots with robots.txt?

Robots.txt gives crawling instructions to well-behaved bots; it is not a full security barrier. Malicious clients can ignore the file.

How do I write the rule for /blog open and /admin blocked?

In the general rule, you can use <code>Disallow: /admin/</code> and keep the public blog area open with <code>Allow: /blog/</code>. After that, it is a good idea to add a sitemap.

Is there a single standard for an AI crawler whitelist?

No. Bot user agents vary by provider and can be spoofed. That is why you should write custom rules only for bots you have tested reliably.

Are robots.txt and noindex the same thing?

No. robots.txt directs crawling, while noindex asks for a page not to be indexed. Private areas also need access control.

Scan your site for free