As well as blocking CCBot and GPTBot using robots.txt

In reaction to robots freely crawling the web and incorporating every valuable asset they find into (closed) AI models, creatives (platforms) have introduced new robots meta tags to denote that they do not want their content to be worked into these models.

One reason is that creators consider "incorporating into an AI model" in itself as an infringement of their copyright. Another reason is that AI models are known to sometimes be able to produce (clearly) recognizable parts of the original works, which then become part of work produced by users of the AI model.

In this article we show how you can add the 'robots noai' and 'robots noimageai' meta tags (invented by DeviantArt) to your Joomla 4 website.
We also show you how to stop OpenAI's web crawler from processing (parts of) your site, using the robots.txt file.

The 'noindex' and 'nofollow' tags

Joomla 4 supports only the setting of the '(no)index' and '(no)follow' robots meta tags. You can set these using a drop-down selection menu in System -> Global Configuration, under the Site tab.

These tags (if different from the default 'index' and 'follow' values) are then set in the web pages produced by the site template. For the Cassiopeia template, this takes place in the file templates/cassiopeia/index.php, as part of this statement:

<jdoc:include type="metas" />

Overriding template files

Additional tags will have to become part of this index.php file as well, but simply adding the tags to the file will not do the job properly. Since this file (and other files) will be overwritten when the template gets updated, we need to override the template's index.php file using a Child Template.

Some explanation on Joomla templates and overrides: A template (in the templates/ directory) consists of its own files and of files overriding other Joomla files (the latter in the html/ subdir of the template). The template itself can only be customized through its predefined options (in a Template Style) and/or by creating custom css/user.css and/or js/user.js files (for CSS/JavaScript-based changes).

A Child Template for Cassiopeia

To edit (i.e. override) existing files belonging to the template itself, we first need to create a Child Template. After pushing the Create Child Template button, you can select which Styles belonging to the original Template will be copied to the Child Template as well.

Now the full directory structure of the original Template is copied to a new directory cassiopeia_child1/ in the template/ directory. The Child initially holds no files at all (apart from the templateDetails.xml file). In this otherwise empty directory structure, we now can create files (preferably by copying them from their location in the original Template directory tree) which will then function as overrides for this Template.

Adding the 'noai' and 'noimageai' tags

In order to add the 'noai' and 'noimageai' tags, we start by copying the index.php file like this:

cd templates/cassiopeia_child1/
cp ../../templates/cassiopeia/index.php .

And then we add this line after the 'jdoc:include' statement mentioned before:

<meta name="robots" content="noai, noimageai">

Don't forget to set the newly created Template Style 'Cassiopeia_child, copy of Cassiopeia - Default' as the default page style, after which the robots meta tags just added should be visible in the HTML page source.

Note that the 'noai' and 'noimageai' tags are by no means a standard yet. They currently serve only as a way to indicate to your (non-human) visitors that you do not want the content of this specific page to be worked into any AI models.

Also note that there is another tag called 'createdwithai', which allows you to indicate that the content of this specific page was generated using AI [1, 2, 3, 4].

Blocking CCBot and GPTBot using robots.txt

In August 2023, OpenAI announced that its GPTBot (feeding the ChatGPT models) will be adhering to the robots.txt standard.

Blocking this bot (and then some) for the whole site can be done by adding this statement to your robots.txt file:

User-agent: CCBot
Disallow: /
User-agent: GPTBot
Disallow: /
User-agent: ChatGPT-User
Disallow: /

All set! (for now that is, as this space is still very new)

Plaats reactie

Security code Vernieuwen

Verstuur