Knowledge Base

Get Expert Website Hosting

Choose website reliability and expertise with SiteGround!

Home / Website Help / How to Block AI Crawlers?

How to Block AI Crawlers?

Last update: Aug 28, 2025

You can block AI crawlers by adding rules to your .htaccess file.

The .htaccess file is usually located in the root public_html/ folder of your website. You can use the File Manager to open and edit it.

Make sure to always create a backup copy of the file before adding/deleting rules.

Here is a sample rule to block a specific AI crawler by its user-agent:

# Block ChatGPT-User bot

RewriteEngine On

RewriteCond %{HTTP_USER_AGENT} ChatGPT-User [NC]

RewriteRule .* – [F,L]

This will prevent the ChatGPT-User bot from crawling your website. If you wish to block multiple providers, paste the same code and replace “ChatGPT-User” with another user-agent.

If you wish to unblock that crawler in the future, simply remove the rules you added from your .htaccess file and save it.

Share this article