header image
English Español Deutsch Fran├žais

How to label your website


The RTA label is free to use, voluntary, and universally available to any website that wishes to clearly and effectively label itself as being inappropriate for viewing by minors.

However, by using the label you signify that you agree to our TERMS AND CONDITIONS.

I only have a few pages to label, how do I do this?

Go to the "how-to" page to grab the RTA label meta-tag.

To add it to the "head" section of a web page insert it below the <head> tag thus:

I have loads of pages to label how do I do this?

There are 3 main ways to add the RTA label to many pages at the same time.

First, if you use PHP you can include the meta-tag or send a response header.

Secondly, if you are able to change your web server configuration you can send a response header with all or some pages. See "How do I label using Apache?" or "How do I label using IIS?" for further information.

Thirdly, if you do not have access to your web server configuration you can still modify your existing html pages. See "How do I label many web pages with a script?" for some tips on changing many web pages all at once.

How do I check that I labeled my site correctly?

Try our RTA label checker.

How do I label using PHP?

PHP is available by default from most ISPs and it can make labelling with RTA much easier. If you are in the process of designing a site having a simple file with the "head" section of the page to "include" in your other pages is probably the easiest way to go. (The "head" is the part of your web page between <head> and </head> that usually contains the title, search keywords and other information that isn't part of the main body of the document.)

Here's one way to do it:

First, make a file inc.head.php:

Next, in your other files such as index.php you can add the following at the top of the page to replace the existing <head> section:

Although this is probably the easiest way to inject the RTA label into your php pages, it is also possible to add the RTA label to the response headers with the header function. Use it like this:

Note that you can get an error from php if the document has already started outputing. There are ways around this.

If you have too many php pages with their own head sections to replace with a manually added include statement you can still do site-wide labelling or use scripts to edit large numbers of pages at once.

How do I label many web pages with a script?

The examples that follow use the perl programming language but they can be adapted to use other languages.

There are a number of ways to identify files that need to be changed but changing them is pretty much always the same process. On unix based systems (linux, bsd, solaris etc) the native "find" command can be used:

Lets break this command down to see what it is doing. First we have:

find -type f -name '*.html'

This will find every file with a file name that ends in .html. Next we have the -exec. The command after -exec will be run on every file found. The file name is represented by {} in the -exec command. The command

perl -pi.backup -e \
's#<head>#<head>\n<meta name="RATING" content="RTA-5042-1996-1400-1577-RTA" />#i' {}

opens the file represented by {} and reads it line by line. When the command finds <head> or <HEAD> it will replace it with

<meta name="RATING" content="RTA-5042-1996-1400-1577-RTA" />

Before actually changing the file perl will make a backup copy of the file with the extension .backup. If you want to remove these backup files try this command:

Find is a very powerful command and may locate more files than you would want to change. To find all the files in a given directory copy the following to a file:

If you saved this file to /home/me/rta.pl you can run it thus:

cd /directory/i/want/to/change
perl /home/me/rta.pl

If you are on a windows based system and you want to change files in subdirectories you will want to use perl's native version of find:

Similarly if you saved this to the file rta.pl somewhere on your command path you could invoke it thus by opening a command window and typing:

perl -S rta.pl

The -S option forces perl to search on your command path for the script.

Note that cd is not used in this case as you have your starting directory already written in. To make a version where you have to cd to the directory replace 'c:\\directory\to\start\in' with '.'. To find a windows version of perl look here.

Caveat: be very careful about running any automatic editing commands multiple times as they may have unexpected effects. In this case, having more than one rta label isn't likely to be a problem. However, to be careful and especially if you are working with large numbers of files, make a backup of the original files before you start.

While we have tested all of the examples in this section, RTAlabel.org does not warrant that these code examples will be suitable for your use. Please carefully test your scripts on small numbers of files to make sure they work before proceeding.

More information:

find command

How do I label using Apache?

You can do site-wide labelling with apache by adding the mod_headers module to apache. Apache does not by default come with this module. You can build the module as a separate dynamic shared object or rebuild apache with the module added in.

In either case typically this is how you would add the module:

cd /path/to/apache/sources
./configure --enable-headers [other options]
make install

It may be the case that mod_headers is part of your build however. To check you'll want to first look for

LoadModule mod_headers modules/mod_headers.so

in your httpd.conf file. If the module is compiled into apache itself you can see if "mod_headers.c" shows up in

/path/to/apache/bin/httpd -l

Once you have established that mod_headers is available on your system add the following to your httpd.conf or .htaccess file:

<IfModule mod_headers.c>
Header set Rating "RTA-5042-1996-1400-1577-RTA"

Restart apache once you have added these lines to the httpd.conf file and check the changes:

HEAD https://mydomain.com/

200 OK ... Rating: RTA-5042-1996-1400-1577-RTA

More information:


How do I label using IIS?

As with apache you will want to send an RTA response header. This microsoft knowledgebase article explains how to send custom response headers with IIS.

How do I label images and video as well?

Use site-wide labelling as described above in "How do I label using Apache?" or "How do I label using IIS?".

How do I only label specific sections of my site?

Either label using PHP or scripts or use virtual hosts if you are labelling using apache or IIS.

To create virtual hosts on apache add something similar to these apache configuration directives to the end of your apache httpd.conf configuration file:

What is a "response header"?

When your browser gets content from a web server it gets more than just the web page. The content that precedes the download of the web page gives the browser useful information about that content. Inserting the RTA label into the response headers is a very powerful way to keep kids away from adult content.

Generally the response header for any requested content would start with a response code - the "200 OK" in the example below. This tells the browser whether or not the server could provide the content. Following that there are various pieces of information called "metadata" relating to the request. These follow the format of:

Header: metadata

Here is an example of a full response header with the rta label included.

200 OK
Connection: close
Date: Wed, 13 Feb 2008 22:36:40 GMT
Accept-Ranges: bytes
ETag: "800b7-65-503db400"
Server: Apache/2.0.59 (Unix) ...
Content-Length: 101
Content-Type: text/html
Last-Modified: Mon, 16 Jul 2007 19:17:36 GMT
Client-Date: Wed, 13 Feb 2008 22:36:33 GMT
Client-Response-Num: 1
Rating: RTA-5042-1996-1400-1577-RTA

... actual content would follow here ...

The end of the response headers is indicated by a blank line. The actual content being requested would then follow along after this information. The content could be as simple as a basic html file or as complex as an mpeg or quicktime movie.

You can add response headers on the fly using PHP, apache and IIS. If you want to look at the response headers for a specific web request and you are on a unix based system you can try the "HEAD" command. Invoke this command this way:

HEAD https://my-url.com

Once you've labeled with RTA, please also add the RTA logo to your site

Thank you for taking this important step in keeping children from accessing Adult material and labeling your Adult content appropriately with RTA.

Also, please help by supporting ASACP and becoming a member to help fund the important work that ASACP does in continuing it's efforts to eliminate child pornography from the Internet. ASACP battles child pornography through its CP Reporting Hotline, and by organizing the efforts of the online adult industry to combat the heinous crime of child sexual abuse. To learn more about ASACP please visit: www.asacp.org

If you are a supporter of ASACP or would like to apply and have added the RTA label to your adult sites, you will be given a special button to show this honorable status in appreciation for your support.

Protect Your Business By Protecting Children!