Wednesday, 17 September 2025

How to Allow AI Bots in Your robots.txt File (2025 Edition)

The world of AI is moving fast and so are the bots that crawl the web to feed large language models (LLMs), AI search engines, and generative tools. If you want your site’s content to be available for AI models like ChatGPT, Claude, Perplexity, or Gemini, you can explicitly grant permission by updating your robots.txt file.

In this guide, you’ll learn:

  • Why AI bots matter in 2025
  • Which user-agents to include
  • A ready-to-use robots.txt template

Why AI Bots Need robots.txt Rules

Traditionally, robots.txt controlled search engines like Googlebot and Bingbot. Now, AI companies also respect these directives to decide whether your content can be indexed for AI search or used for model training.

  • Search bots (AI answers/assistants): Allowing them means your content may appear in AI-powered search results (e.g., Perplexity, You.com).
  • Training crawlers: Allowing them means your content may be used to train or fine-tune large AI models (e.g., GPTBot, ClaudeBot).

By updating your robots.txt, you can allow, block, or mix your policies across these bots.


Major AI User-Agents in 2025

OpenAI (ChatGPT / SearchGPT)

  • GPTBot => training crawler
  • ChatGPT-User => on-demand browsing in ChatGPT
  • OAI-SearchBot => indexing for SearchGPT

Anthropic (Claude)

  • ClaudeBot => model training
  • Claude-Web / anthropic-ai => crawling/AI access

Perplexity

  • PerplexityBot => AI search engine

Google (Gemini)

  • Google-Extended => controls if Gemini can use your content for AI

Apple

  • Applebot-Extended => controls Apple AI training usage

Amazon

  • Amazonbot => AI + product/search crawling

Common Crawl

  • CCBot => feeds public datasets used in AI training

AI Search Engines

  • YouBot => You.com
  • PhindBot => Phind AI search
  • ExaBot => Exa.ai
  • AndiBot => Andi search
  • FirecrawlAgent => Firecrawl AI

Example: Allowing AI Bots

Here’s a robots.txt example that explicitly allows AI bots alongside traditional crawlers:

# Default: allow all crawlers
User-agent: *
Disallow:

# --- Explicitly ALLOW major AI/LLM bots ---

# OpenAI
User-agent: GPTBot
Allow: /
User-agent: ChatGPT-User
Allow: /
User-agent: OAI-SearchBot
Allow: /

# Anthropic (Claude)
User-agent: ClaudeBot
Allow: /
User-agent: Claude-Web
Allow: /
User-agent: anthropic-ai
Allow: /

# Perplexity
User-agent: PerplexityBot
Allow: /

# Google AI usage token
User-agent: Google-Extended
Allow: /

# Apple AI usage token
User-agent: Applebot-Extended
Allow: /

# Amazon
User-agent: Amazonbot
Allow: /

# Common Crawl
User-agent: CCBot
Allow: /

# AI search engines
User-agent: YouBot
Allow: /
User-agent: PhindBot
Allow: /
User-agent: ExaBot
Allow: /
User-agent: AndiBot
Allow: /
User-agent: FirecrawlAgent
Allow: /

Optional: Balanced Policy (Allow AI Search, Block Training)

If you want to appear in AI search results but not have your content used for model training, use a mixed policy. For example:

# Allow AI search crawlers
User-agent: PerplexityBot
Allow: /
User-agent: YouBot
Allow: /
User-agent: PhindBot
Allow: /
User-agent: ExaBot
Allow: /
User-agent: AndiBot
Allow: /
User-agent: OAI-SearchBot
Allow: /

# Disallow training/aggregator crawlers
User-agent: GPTBot
Disallow: /
User-agent: ClaudeBot
Disallow: /
User-agent: Google-Extended
Disallow: /
User-agent: Applebot-Extended
Disallow: /
User-agent: CCBot
Disallow: /

Pro Tips

  • Keep it updated: New AI bots appear frequently so review your list quarterly.
  • Combine with enforcement: Some bots may ignore rules. If strict compliance matters, pair robots rules with IP/reverse-DNS checks or WAF bot controls.
  • Test quickly: Host your robots.txt at https://<your-domain>/robots.txt and fetch it from a browser or with curl to verify.

Going Further with SEO

If you’re running an Optimizely CMS site and want deeper control over SEO, check out my open-source tool: SEOBOOST for Optimizely CMS.

AI is becoming a parallel discovery channel next to Google. Your robots.txt file is the simplest way to take control of how your content participates.

September 17, 2025

Friday, 14 March 2025

Removing a Segment from the URL in Optimizely CMS 12 using Partial Routing

Problem Statement

In Optimizely CMS 12, dynamically generated pages inherit URL segments from their container pages. However, in certain cases, some pages are renamed, leading to undesired URL structures. The three primary challenges faced in this scenario are:

  1. Ignoring the container page name segment from the URL.

  2. Redirecting to the new page without using any add-ons or manually mapping old URLs to new ones.

  3. Create a URL for the 'View on Website' hyperlink without including container pages in the CMS.

Page Hierarchy and Expected Results

Consider the following page hierarchy:

  • Start PageContainer PageBlock Page

  • Start PageContainer Page 1Container Page 2Block Page

  • Expected Result:

    • Remove the ‘container-page’ segment from the URL.

      Start Page / Block Page

Example URLs

Original URL → Expected New URL

https://www.alloy.com/container-page/newshttps://www.alloy.com/news

https://www.alloy.com/container-page/news/article-1https://www.alloy.com/news/article-1

https://www.alloy.com/container-page1/container-page2/news/article-1https://www.alloy.com/news/article-1

https://www.alloy.com/container-page1/news/container-page2/article-1https://www.alloy.com/news/article-1

Solution Using Partial Router

To solve the problem, the following steps must be implemented:

  • Utilize Partial Routing to handle URL resolution and bypass container pages dynamically.

Using Partial Routing for URL Customization

Container pages, which inherit from PageData but do not have associated views or controllers, are frequently used to organize content in the tree. To provide flexibility, developers may introduce an optional boolean setting in the site settings page, allowing editors to enable or disable the visibility of the container page segment in URLs.

However, in this example, rather than using a configurable setting, we treat ContainerPage page type as container pages by default. This ensures that Partial Routing effectively resolves and cleans up URLs dynamically, omitting unnecessary container page segments.

Code Implementation

Below is the code snippet for handling these changes:

This approach ensures a cleaner URL structure and avoids unnecessary dependencies while maintaining flexibility in content organization.

March 14, 2025

Monday, 15 January 2024

SEOBOOST for Optimizely CMS 12

SEOBOOST for Optimizely CMS 12 is a technical SEO add-on designed to give developers and editors more control over canonical links, hreflang alternate links, breadcrumbs, and robots.txt management. It builds on the earlier EPiServer-era version and adds broader support for real-world Optimizely routing and content scenarios.

Last reviewed: July 24, 2026

If you are looking for the older EPiServer-focused article published on May 7, 2019, you can still find it here: SEOBOOST for EPiServer 11.

What SEOBOOST adds

  • robots.txt management through the CMS
  • Canonical link generation with better route handling
  • hreflang alternate links for multilingual and multi-site setups
  • Breadcrumb structured data output
  • Support for simple addresses, partial routing, shortcuts, and trailing slash behavior

What's new in the Optimizely CMS 12 version

This version expands SEOBOOST beyond the earlier EPiServer implementation by supporting more real-world routing scenarios and giving editors more flexibility over technical SEO settings.

robots.txt management

SEOBOOST can expose a CMS-managed robots.txt page type and route, allowing editors to manage crawler directives without changing code.

public void ConfigureServices(IServiceCollection services)
{
    services.AddSeoBoost(x =>
    {
        x.EnableRobotsTxtSupport = true;
    });
}

Canonical links

SEOBOOST supports canonical link generation across scenarios such as:

  • partial routing
  • simple addresses
  • page shortcuts
  • multi-site and multi-domain environments
  • automatic trailing slash handling

You can also specify a custom canonical field in CMS:

public void ConfigureServices(IServiceCollection services)
{
    services.AddSeoBoost(x =>
    {
        x.CustomCanonicalTagFieldName = "CanonicalTag";
    });
}

hreflang alternate links

Like canonical links, SEOBOOST supports alternate link generation with better handling for multilingual and multi-domain Optimizely setups, helping teams create cleaner signals for localized content.

Installation

Install the package with:

dotnet add package SeoBoost

Example configuration

public void ConfigureServices(IServiceCollection services)
{
    services.AddSeoBoost(x =>
    {
        x.CustomCanonicalTagFieldName = "CanonicalTag";
        x.UseSimpleAddressAsPath = true;
        x.EnableRobotsTxtSupport = true;
        x.UseMirrorPageReference = true;
        x.UseSiteUrlAsHost = true;
    });
}

When SEOBOOST is useful

  • When canonical URLs need to reflect real routing behavior
  • When multilingual pages need stronger hreflang output
  • When editors need CMS-managed robots.txt support
  • When technical SEO needs to be handled more consistently across sites

Links

GitHub repository
NuGet package
Legacy EPiServer 11 post

FAQ

Is this the same as the older 2019 SEOBOOST post?
It is the newer Optimizely CMS 12 version with broader features and updated configuration options.

Does SEOBOOST only handle canonical tags?
No. It also supports hreflang alternate links, breadcrumbs, and robots.txt management.

January 15, 2024

Tuesday, 7 May 2019

SEOBOOST for Optimziely CMS: Absolute Canonical, hreflang, and Breadcrumbs

Legacy version: If you are using the newer Optimizely CMS version of SEOBOOST, see the updated post here: SEOBOOST for Optimizely CMS.

Last reviewed: July 24, 2026

SEOBOOST was originally created to improve how Optimizely sites output canonical links, hreflang alternate links, and breadcrumbs. The built-in HTML helpers made implementation easier, but they often rendered relative URLs, while many projects required fully qualified absolute URLs for stronger SEO consistency across multi-domain and multilingual setups.

To solve that gap, I created SEOBOOST as a lightweight open-source helper library for Optimizely. It takes website domain settings into account and generates SEO-friendly output more consistently for sites that need better control over canonical and alternate links.

What SEOBOOST provides

  • Canonical link output
  • hreflang alternate links
  • Breadcrumb structured data support

Why this mattered

Many Optimizely projects needed absolute URLs for canonical and alternate links, especially in multi-site or multilingual environments. That made a small helper library like SEOBOOST useful for improving consistency and reducing repeated custom code.

Usage

Include the namespace at the top of your master page or view:

@using SeoBoost.Helper

For canonical tags, render:

@Html.GetCanonicalLink()

For hreflang alternate links, render:

@Html.GetAlternateLinks()

For breadcrumbs, render:

@Html.GetBreadcrumbItemList()

Legacy platform context

This post refers to the Optimizely 11-era version of SEOBOOST. If you are working on newer Optimizely solutions, the January 15, 2024 article covers the broader SEOBOOST feature set for Optimizely CMS 12.

Links

Updated SEOBOOST for Optimizely CMS 12 post
GitHub repository
Legacy CMS 11 repository
NuGet package

FAQ

Is this the current SEOBOOST version?
No. This post covers the older Optimizely-focused version. The newer Optimizely CMS 12 version is covered in the January 15, 2024 post.

Why use absolute canonical URLs?
Absolute URLs make canonical implementation more explicit and are still recommended by Google for long-term consistency.

May 07, 2019