prohibit chatGPT from accessing the content of its own website

openai-lock

It's no secret that people using chatGPT like to swipe content from other websites, have it rewritten and then embed it on their own website. And I can already say: You won't really be able to prevent people from stealing content, but with the following methods you can at least prevent chatGPT or OpenAI from directly accessing your website.

However, if Text-Klauer simply extracts the content from the Browser copying and pasting into chatGPT, unfortunately there is not much you can do about it.

But OpenAI's servers are kind enough to identify themselves correctly and also listen to requests to refrain from accessing them. For this reason we can work with one of the following two commands.

This is how you block access to your own website or WordPress blog for chatGPT (OpenAI).
This is how you block access to your own website or WordPress blog for chatGPT (OpenAI).

Block access for chatGPT via robots.txt

A common way to restrict access to your website content is to use a file called robots.txt. This file contains instructions on which pages or folders on your site should not be scanned or indexed by search engines and other bots. To prevent access from specific bots, you can add specific user agents, such as “ChatGPT” or “OpenAI”.

User agent: ChatGPT Disallow: / User agent: OpenAI Disallow: /

How to create a robots.txt file:

  1. Creates a file called “robots.txt” in plain text (WordPress usually creates this itself).
  2. Pastes the above code into the file.
  3. After saving the file as robots.txt, upload it to the root of your website, for example https://www.sir-apfelot.de/robots.txt

If you use WordPress but don't want to access the server via FTP, you can also edit the robots.txt with the plugin WP Robots Txt change.

Block access for chatGPT via .htaccess

You can deny ChatGPT access to your website by adding the following code to the “.htaccess” file on your web server:

# Blocks ChatGPT and OpenAI RewriteEngine on RewriteCond %{HTTP_USER_AGENT} ChatGPT [OR] RewriteCond %{HTTP_USER_AGENT} OpenAI RewriteRule .* - [F]

This code uses Apache's mod_rewrite module to inspect the HTTP_USER_AGENT header of incoming requests and rejects any requests from ChatGPT or OpenAI with a 403 Forbidden message.

To implement this code, follow the steps below:

  1. Create or edit the .htaccess file in the root of your website.
  2. Copy and paste the above code into the .htaccess file and save it.

Important, if you do something wrong here, the entire website can no longer be accessed. It is therefore advisable to make a copy of the .htaccess file before working on it.

In case you use WordPress, I can give you the plugin Htaccess File Editor recommend. This allows you to edit the file in WP-Admin and also test whether the syntax is correct before overwriting the file. This eliminates a number of sources of error.

Conclusion

The topic of AI and chatGPT will still have a few surprises (both positive and negative) in store for bloggers. I will not “protect” my blog against chatGPT as that also gives me the opportunity to use the AI ​​to analyze and improve my blog articles, but if someone is strictly against AI they can use the above techniques to gain access lock for the tool of OpenAI.

What do you think about AI and in particular chatGPT? Are you more of a fan or denier?

Did you like the article and did the instructions on the blog help you? Then I would be happy if you the blog via a Steady Membership would support.

Post a comment

Your e-mail address will not be published. Required fields are marked with * marked

In the Sir Apfelot Blog you will find advice, instructions and reviews on Apple products such as the iPhone, iPad, Apple Watch, AirPods, iMac, Mac Pro, Mac Mini and Mac Studio.