Introduction

In this step-by-step guide, you'll learn how to effectively manage AI crawlers' access to your website in 2026. We'll cover how to identify GPTBot, ClaudeBot, PerplexityBot, Google-Extended, and Bytespider, set up robots.txt for selective access, implement server-side protection, understand legal considerations, establish monitoring, and test all configurations through proxies. By the end of this guide, you'll have a functioning control system in place, minimizing unwanted data scraping while maintaining indexing for the search engines you want.

This material is tailored for beginners, with elements for the advanced. It's suitable for website owners, developers, SEO and content managers, administrators, and anyone looking to protect their content and understand how AI bots operate.

Before you start, it's helpful to know the basics of website structure and how to edit files on your hosting, but we’ll explain each step. Plan to dedicate 2 to 4 hours for the entire process, depending on the current state of the project, infrastructure complexity, and access to logs.

Preliminary Preparation

Before making changes, ensure you have all necessary tools and access. This will allow you to proceed smoothly without interruptions or errors.

Required Tools and Access

  • Access to hosting or server with permissions to edit the website's root directory (the folder containing robots.txt).
  • Access to the web server (Nginx, Apache) to configure blocking rules at the server level.
  • Access to logs (access.log, error.log) for analyzing bot traffic.
  • Access to the content management system or code repository, if robots.txt is versioned.

Programs and Utilities

  • Command line tools with curl, grep, awk, sed, host or dig installed.
  • A text editor for configuration edits (e.g., built-in hosting editor, nano, vim, or a local editor with SFTP upload capability).
  • Optional: GoAccess for quick log analytics.

What to Install and Configure

  • Verify that you have access to the web server log: the path is typically /var/log/nginx/access.log or /var/log/apache2/access.log.
  • Ensure that the domain and website are served by the expected server (Nginx or Apache) and that you know where to edit configurations.
  • Prepare a test subdomain or test clone of the website if you want to practice rules without risking the production environment.

Backups

  • Back up the current robots.txt file.
  • Save backups of the web server configurations you plan to change.
  • If you’re using a version control system, create a separate branch for edits.

⚠️ Attention: Before making changes to web server configurations, be sure to save backups and note the current working configuration so that you can easily revert if necessary.

Tip: Keep a change log: date, file, line, comment. This will help you quickly understand what and when was modified.

Key Concepts

To confidently manage access, it's important to understand the basic terminology and principles.

Key Terms

  • Crawler - an automated program that browses websites and retrieves pages.
  • AI Crawler - a bot that collects data to train and operate large language models (LLM) or generative services.
  • robots.txt - a file located in the website root where you tell bots what can and cannot be scanned.
  • User-Agent - a string that identifies a bot.
  • Reverse DNS - a reverse check of the IP address that verifies the IP belongs to the claimed domain of the bot operator.

Main Operating Principles

  • Most reputable bots respect the instructions in robots.txt and the X-Robots-Tag headers. Some identify specific User-Agent groups (e.g., Google-Extended).
  • robots.txt is a recommendation, not a technical barrier. Unethical bots may not comply.
  • Server rules (Nginx, Apache) are enforced and can return 403 Forbidden or 429 Too Many Requests.
  • It’s crucial to distinguish search bots from AI bots. The goal is to avoid harming SEO and retain access for search engines when necessary.

What’s Important to Understand

  • The optimal strategy combines a correct robots.txt for reputable bots and server-side filtering for unwanted agents.
  • Bot accessibility and behavior depend on geography and networks. For accurate tests, use proxies from different countries and networks.
  • Legal wording on the website strengthens your position but cannot replace technical measures.

Tip: First configure and test robots.txt, then add server-side blocking. This will lower the risk of accidentally disabling important services.

Step 1: Conduct a Bot Traffic Audit

Step Goal: Understand which bots are already visiting the site, how often, and what they are requesting.

Step-by-Step Instructions

  1. Open your web server access logs. Example for Nginx: tail -n 2000 /var/log/nginx/access.log | less.
  2. Filter lines with potential AI bots: grep -i -E "gptbot|perplexitybot|claudebot|claude-web|bytespider|google-extended" access.log.
  3. Collect statistics on request frequency: awk '{print $1}' access.log | sort | uniq -c | sort -nr | head -50.
  4. Identify the most visited URLs for these bots: grep -i "gptbot" access.log | awk '{print $7}' | sort | uniq -c | sort -nr | head -30.
  5. If GoAccess is installed, run: goaccess -f /var/log/nginx/access.log --log-format=COMBINED and review the User-Agent report.

Important Notes: Logs might be located in a different path. Check the configuration. If logs are in JSON format, use jq to filter by User-Agent.

Tip: Set up a cron job to aggregate bot statistics. For example, schedule a daily report on key User-Agents.

✅ Check: You should have a table detailing bot names, visit frequencies, a list of the most common URLs, and IP ranges.

Possible Issues and Solutions: If logs are empty, check the logging format on the server and the paths. If lacking access permissions, request them from your hosting provider or admin.

Step 2: Identify AI Crawlers by User-Agent and IP

Step Goal: Ensure that visits truly belong to the claimed AI bots and not disguises.

Which User-Agent to Use in 2026

  • GPTBot: "GPTBot" (OpenAI). Correctly reads robots.txt with a block for GPTBot.
  • ClaudeBot and Claude-Web: "ClaudeBot" and "Claude-Web" (Anthropic). Similarly respect their groups in robots.txt.
  • PerplexityBot: "PerplexityBot". Usually contains a compatible entry like Mozilla/5.0 (compatible; PerplexityBot/...).
  • Google-Extended: "Google-Extended". This is an extension for generative systems from Google. Managed through robots.txt, not as a separate search crawler.
  • Bytespider: "Bytespider" (ByteDance). Scans media and pages, can be active and substantial in volume.

Reverse DNS Check

  1. Obtain the IP from the logs. Example: 203.0.113.25.
  2. Conduct a reverse lookup: host 203.0.113.25 or dig -x 203.0.113.25 +short.
  3. Ensure the domain belongs to the bot's operator. For OpenAI, expect domains related to openai.com; for Anthropic - anthropic.com; for Perplexity - perplexity.ai; for Google-Extended - Google domains; for Bytespider - bytedance or bytespider.
  4. Perform a direct check: host the_name_obtained_in_step_2. The IP should match the original (forward-confirmed reverse DNS).
  5. Note suspicious IPs that lack a valid reverse entry or confirmation.

Important Notes: Some providers do not publish full ranges of IPs. Reverse DNS with a direct check is the best practice for verification.

Tip: Maintain a dictionary of regular expressions for User-Agent and operator domain zones. This will speed up future verifications.

✅ Check: For each suspicious IP, you have the results of host/dig and note whether it's confirmed or unconfirmed.

Possible Issues and Solutions: If the reverse entry is missing, treat the traffic with caution. Add such IPs to server filtering and monitor for repeat visits.

Step 3: Create or Update robots.txt for AI Bots

Step Goal: Establish your access policy for AI crawlers without affecting needed search bots.

Where to Store robots.txt

The file should be accessible at https://your-domain/robots.txt and reside in the web site's root directory. If you have multiple subdomains, each will need its own robots.txt file.

Basic Template for Blocking AI Bots

Example content for robots.txt with selective blocking of AI bots while maintaining access for search engines:

User-agent: GPTBot Disallow: / User-agent: ClaudeBot Disallow: / User-agent: Claude-Web Disallow: / User-agent: PerplexityBot Disallow: / User-agent: Bytespider Disallow: / User-agent: Google-Extended Disallow: / User-agent: * Allow: / Sitemap: https://your-domain/sitemap.xml

If you want to limit the crawl rate for some bots, add a Crawl-delay line (not all respect it):

User-agent: Bytespider Crawl-delay: 10

How to Apply and Verify

  1. Create or edit the robots.txt file in the root of the site.
  2. Save the file in UTF-8 encoding without BOM.
  3. Open https://your-domain/robots.txt in your browser and ensure that the file is accessible.
  4. Check using the command: curl -I https://your-domain/robots.txt.
  5. Conduct targeted checks with the needed User-Agent: curl -H "User-Agent: GPTBot" -I https://your-domain/robots.txt.

Important Notes: User-Agent groups are independent. The most specific group for the bot is used. Ensure that necessary search bots, like Googlebot and others, aren’t restricted by your rules for AI bots.

Tip: If you want to allow AI bots access only to open documentation, use Allow for specific paths and Disallow by default.

✅ Check: The robots.txt file contains explicit sections for GPTBot, ClaudeBot, Claude-Web, PerplexityBot, Bytespider, and Google-Extended. The file is served with a 200 OK code, correct content, and is visible in the browser.

Possible Issues and Solutions: If the file won’t open, check the file and directory permissions. If changes are not visible, clear the cached version on your hosting or CDN.

Step 4: Set Fine Permissions in robots.txt

Step Goal: Flexibly manage access to different sections and file types without total blocking.

Template Examples

  • Allow static files for everyone: User-agent: * Allow: /*.css$ Allow: /*.js$ Allow: /images/ Allow: /fonts/
  • Allow AI bots access to documentation: User-agent: GPTBot Allow: /docs/ Disallow: /
  • Completely block private sections: User-agent: * Disallow: /admin/ Disallow: /internal/
  • Allow crawlers the sitemap and RSS: User-agent: * Allow: /sitemap.xml Allow: /feed.xml

Step-by-Step Instructions

  1. Identify the sections that can be provided to AI bots without risk.
  2. Add the corresponding Allow before the general Disallow in AI bot sections.
  3. For all bots, ensure access to static and sitemap resources.
  4. Check the order of rules: in each section, list Allow first followed by Disallow to prioritize allowances.
  5. Double-check the final file for typos: extra spaces, incorrect symbols, missing empty lines between groups are not critical but readability is important.

Important Notes: The robots.txt standard does not support regular expressions. The * symbol matches any number of characters, $ signifies the end of the line. Do not use non-existent directives.

Tip: If you have a multilingual site, specify Allow for translated documentation sections, while closing off all other content to AI bots.

✅ Check: Targeted curl requests with User-Agent specific bots show that allowed paths remain accessible, while restricted ones are marked as Disallow in robots.txt.

Possible Issues and Solutions: If a bot continues to access restricted sections, check if it truly reads robots.txt. Server-level blocking may be required.

Step 5: Enable Server-Level Protection

Step Goal: Forcefully restrict access for unwanted bots and reduce server load.

Nginx: Blocking by User-Agent

Example configuration to add in http or server:

map $http_user_agent $block_ai { ~*gptbot 1; ~*perplexitybot 1; ~*(claudebot|claude-web) 1; ~*bytespider 1; default 0; } server { if ($block_ai) { return 403; } }

After edits, check the configuration and restart the server.

Apache (.htaccess or virtual host config)

Example using mod_rewrite:

RewriteEngine On RewriteCond %{HTTP_USER_AGENT} (?i)gptbot [OR] RewriteCond %{HTTP_USER_AGENT} (?i)perplexitybot [OR] RewriteCond %{HTTP_USER_AGENT} (?i)claudebot|claude-web [OR] RewriteCond %{HTTP_USER_AGENT} (?i)bytespider RewriteRule .* - [F]

Rate Limiting

You can set up rate limiting in Nginx to reduce peak load from excessive bot requests.

Step-by-Step Instructions

  1. Identify which bots should receive a 403 response.
  2. Add blocking rules in Nginx or Apache.
  3. Check the configuration syntax.
  4. Restart the web server.
  5. Verify access using curl with the appropriate User-Agent.

⚠️ Attention: Blocking by User-Agent will not protect against bots masquerading as browsers. For these cases, use additional rules: reverse DNS checking, behavioral markers, and network filters.

Tip: Maintain a central list of blocked User-Agents in one place and include it to manage centrally.

✅ Check: Requests with User-Agent GPTBot, PerplexityBot, ClaudeBot, Claude-Web, and Bytespider receive a 403 or 429 response depending on your policy.

Possible Issues and Solutions: If the server won’t restart due to an error, check the syntax and error logs. If blocking impacts legitimate traffic, refine the rules and exceptions.

Step 6: Legal Aspects and Content Usage Policy

Step Goal: Establish the legal position of your site and strengthen technical measures.

Usage Policies and Terms

  • Add a section on your site outlining the terms of content usage, explicitly prohibiting unauthorized use for training AI models without your consent.
  • Clarify the licensing status of materials and rights to multimedia.
  • Provide contact information for licensing inquiries.

Headers and Meta Tags

  • Include X-Robots-Tag headers at server level for general sections: X-Robots-Tag: noai; X-Robots-Tag: noimageai, where appropriate.
  • Add meta name="robots" content="noai, noimageai" to page templates for sections that should not be used for training.

Example for Nginx

location /private/ { add_header X-Robots-Tag "noai, noimageai" always; }

Step-by-Step Instructions

  1. Prepare an updated section on content usage terms.
  2. If the content is critical for your business, coordinate the text with a lawyer.
  3. Add X-Robots-Tag headers in server configuration for private sections.
  4. Place meta tags on pages needing enhanced restrictions.
  5. Check server responses using curl -I and ensure headers are present.

⚠️ Attention: Legal wording and headers strengthen your position and help conscientious AI providers comply with your rules. But they do not replace technical limitations.

Tip: Include the date of the last policy update and maintain versioning to demonstrate the applicability of terms at the time of scanning.

✅ Check: Pages from private sections return X-Robots-Tag with expected values, and the policy is published and accessible from the site's footer.

Possible Issues and Solutions: If new headers are not visible, check configurations and for any overrides at the CMS or intermediary layers.

Step 7: Monitoring and Notifications

Step Goal: Ensure continuous oversight so changes are not violated, and bots behave as expected.

Setting Up Monitoring

  • Periodic log parsing: daily reports on User-Agent, IP, response codes, sections.
  • Threshold alerts: spikes of 4xx and 5xx for specific User-Agent, sudden increases in requests to restricted sections.
  • Dashboards: summary of AI bot requests, dynamics, top URLs, average load.

Step-by-Step Instructions

  1. Create a script that counts requests by key User-Agent.
  2. Schedule the script to run via cron and email the results.
  3. Add an alert rule: if Bytespider makes more than N requests per minute, send a notification.
  4. Weekly, reconcile robots.txt with backups to track unplanned edits.
  5. Occasionally check the reverse DNS of new IPs from logs.

Tip: Document releases and changes on the site. Correlate spikes in bot traffic with update dates, this simplifies investigations.

✅ Check: You receive regular reports, at least one alert for a spike in AI bot activity, and a functioning dashboard with key metrics.

Possible Issues and Solutions: If reports do not arrive, check log access permissions, path accuracy, and email sending. For large logs, use rotation and compression.

Step 8: Check Accessibility Through Proxies from Different Networks

Step Goal: Ensure that your rules work uniformly across various regions and networks, and bots see the correct robots.txt.

Why Proxies Matter

Some bots and infrastructures behave differently across networks and countries. Testing through proxies helps replicate real scenarios and catch hidden issues.

How to Test with Proxies

  1. Prepare a list of tests: request robots.txt and a few key pages.
  2. Simulate bot requests through curl with User-Agent and proxy: curl -x http://login:password@ip:port -A "GPTBot" -I https://your-domain/robots.txt.
  3. Repeat for ClaudeBot, PerplexityBot, Bytespider, and Google-Extended.
  4. Check that you receive expected codes (200 for allowed, 403 for server-level blocks).
  5. Save results in a file for history and comparison.

Tip: For SOCKS5, use: curl -x socks5h://login:password@ip:port -A "PerplexityBot" -I https://your-domain/robots.txt.

Using mobile proxies is convenient to emulate real networks of telecom operators. The MobileProxy.Space service offers mobile proxies with real carrier SIM cards, 218+ million IPs, 53+ countries, simultaneous support for HTTP(S) and SOCKS5, flexible timer rotation, API or link usage, 3 hours of free testing, and 24/7 support. This is helpful when you need to verify website behavior from different operators and regions.

Free Verification Tools

  • IP Check: ensure the request goes through the proxy and shows the expected external IP.
  • DNS Leak Test: verify that DNS requests resolve accurately from the chosen network.
  • Proxy Checker: test the speed and availability of proxies before tests.
  • Proxy Calculator: estimate how many streams and addresses are needed for regular monitoring.
  • Latency Map: compare average latencies from different regions for test planning.
  • Browser Fingerprint Generator: check how the browser fingerprint appears when using a proxy, if conducting client tests.

✅ Check: Repeated requests from multiple countries and networks return the same policy for AI bots, response codes meet expectations, and robots.txt is accessible and accurate.

Possible Issues and Solutions: If responses differ, check caching and configurations at the load balancer level. If necessary, synchronize configurations between data centers.

Outcome Verification

Checklist

  • robots.txt contains explicit sections for GPTBot, ClaudeBot, Claude-Web, PerplexityBot, Google-Extended, and Bytespider.
  • Server blocking is configured and returns 403 where intended.
  • X-Robots-Tag headers are present on private sections.
  • Logs show the expected decrease in access from AI bots to restricted areas.
  • Proxy tests validate uniform behavior across different networks.

How to Test

  1. curl -H "User-Agent: GPTBot" -I https://your-domain/robots.txt.
  2. curl -A "ClaudeBot" -I https://your-domain/private-section/.
  3. Check response codes and the presence of X-Robots-Tag where it should be.
  4. Review logs: grep -i -E "gptbot|perplexitybot|claudebot|bytespider" access.log.
  5. Compare with a baseline summary from before implementing changes.

Success Metrics

  • The proportion of requests from AI bots to restricted URLs approaches zero.
  • No decline in organic traffic from search engines that you haven't blocked.
  • Resource-heavy spikes from unwanted bots have disappeared or significantly decreased.

Tip: Document the current policy as a baseline. In the future, if growth or changes occur, you can quickly revert to a proven configuration.

Common Errors and Solutions

  • Error: robots.txt is not in the root. Cause: the file was uploaded to a subdirectory. Solution: move it to the site root so it is accessible at /robots.txt.
  • Error: Blocking Googlebot due to incorrect section. Cause: User-Agent groups were mixed up. Solution: do not use general Disallow in sections for AI bots, create separate groups.
  • Error: Rules are not working. Cause: syntax errors or incorrect encoding. Solution: save in UTF-8 without BOM and check the format of lines.
  • Error: Bot continues to scan restricted sections. Cause: ignoring robots.txt. Solution: add server-level blocking and rate limiting.
  • Error: false positives in server blocking. Cause: overlap with User-Agents of legitimate systems. Solution: refine regular expressions and add exceptions.
  • Error: different responses from different regions. Cause: caching or unsynchronized configurations. Solution: clear caches and synchronize configurations between fronts.
  • Error: log bloating and analysis complexity. Cause: no rotation. Solution: enable logrotate, compression, and automated reports.

Additional Opportunities

Advanced Settings

  • Dynamic robots.txt: serve different policies based on host or environment (prod, staging), generating the file by the server.
  • Exclude certain parameters: create canonical URLs to reduce junk crawls.
  • Honeypots and traps: track bots that ignore robots.txt by marking their activity and strengthening filters.

Optimization

  • Reduce the depth of navigation in restricted sections so it’s harder for bots to stumble upon them accidentally.
  • For images, add X-Robots-Tag: noimageai, if you wish to exclude them from training.
  • Return light statuses and short responses for blocked bots to minimize load.

What Else Can Be Done

  • Content inventory: separate materials into those open for AI and those closed, reflecting this in policy and robots.txt.
  • Data labeling: use structured data carefully to avoid revealing too much.
  • Anomaly detection systems: set up application-level alerts to identify atypical activity.

Tip: Plan quarterly reviews of policy. The landscape of AI bots changes rapidly, and the relevance of instructions directly impacts your security.

For comprehensive geographic testing, periodically use mobile proxies in different countries and with different operators. MobileProxy.Space offers a wide geography, simultaneous support for HTTP(S) and SOCKS5, and flexible timer rotation.

FAQ

Question: How quickly will changes in robots.txt take effect? Answer: Reputable bots check robots.txt regularly. Typically, the effects are noticeable within a few hours or a couple of days.

Question: Can I legally prohibit the use of my content in LLM? Answer: You can prohibit this in usage terms and technically restrict access. However, compliance depends on the conscience of the provider. If it’s critically important, consult a lawyer.

Question: Why is Google-Extended listed separately? Answer: This is a control channel for how content is used by Google’s generative systems. It does not affect regular search indexing, governed by other groups.

Question: How does robots.txt differ from X-Robots-Tag? Answer: robots.txt states rules for the entire site or sections. X-Robots-Tag is applied at the server response level and can apply to specific URLs and file types.

Question: What if a bot falsifies its User-Agent? Answer: Include reverse DNS checks, behavioral filters, rate limiting, and, if necessary, IP range blocking.

Question: How to avoid harming SEO? Answer: Carefully separate rules for AI bots and search crawlers. Do not add general blocks in the global User-agent: * section unnecessarily.

Question: Is a sitemap needed for AI bots? Answer: No. A sitemap primarily serves search engines. However, you can use the Sitemap to clearly mark allowed content.

Question: Does crawl-delay make sense? Answer: It’s not a standardized directive, but many bots respect it. It’s helpful to reduce load with partial access.

Question: How to test rules from another country? Answer: Execute curl with the desired bot’s User-Agent through a proxy from the selected region and compare responses with reference ones.

Question: Can access be combinatorially allowed to documentation but disallowed to multimedia? Answer: Yes. Use Allow and Disallow in AI bot sections and X-Robots-Tag: noimageai for images.

Conclusion

You have completed a comprehensive journey from auditing bots to implementing technical and legal measures for protecting your content from unwanted use by AI crawlers. You've learned how to identify and verify AI bots by User-Agent and reverse DNS, configure robots.txt with precise rules, add forced server-side blocking, outline a clear content usage policy reinforced with X-Robots-Tag headers, establish monitoring, and test results from different networks through proxies. Now you have a reproducible instruction for blocking and allowing AI bots, which minimizes risks to content and SEO.

Moving forward, develop your system: update rules for new bots, automate reports and alerts, conduct periodic audits, and test through proxies. For regular checks from different networks and countries, mobile proxies can be a convenient solution. MobileProxy.Space offers 218+ million IPs, 53+ countries, real carrier SIM cards, simultaneous HTTP(S) and SOCKS5 support, timer-based rotation, API, or link use, 3 hours of free testing, and 24/7 support. New users also receive a 20% discount with the promo code YOUTUBE20 on their first purchase.

Tip: Save the current configuration and checklists in a corporate wiki. This will speed up team training and reduce time spent on future changes.