Single page rating
If your website has one age rating for all its content, it’s very easy to implement age classification – you only need to upload a short age.xml file and you are done. But what about different age ratings for different pages? It’s almost as easy. To fit different technical options that webmasters may implement age.xml offers different ways to make individual age ratings for single pages.
You always need an age.xml file
In all cases you need an age.xml file at the root of your server. That is the place where you also have files like robots.txt and googlesitemap. If you would like to implement age ratings for each single page, the age.xml file must contain (besides general information) the following information:
- What option for single page rating did you choose? It's called "labeltype" in the age.xml definition
- Default age: In case something goes wrong, what is the minimum required age a parental control system should work with?
<ageblock-labeltype>
<httpheader>false</httpheader>
<htmlmeta>false</htmlmeta>
<phraselabel>false</phraselabel>
<agesubmit>false</agesubmit>
<label-z>false</label-z>
<xmlfile>true</xmlfile>
<default-age>18</default-age>
</ageblock-labeltype>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!—- age classification (age-label.com) -->
<age-declaration>
<ageblock-basic>
<age-issuer>Ratingbody</age-issuer>
<last-change>2015-03-01</last-change>
<label-version>2.0</label-version>
<revisit-after>1days</revisit-after>
</ageblock-basic>
<ageblock-country>
<country class="age.xml">
<country-code>all</country-code>
</country>
<country-default>age.xml</country-default>
</ageblock-country>
<ageblock-labeltype>
<httpheader>true</httpheader>
<htmlmeta>false</htmlmeta>
<phraselabel>false</phraselabel>
<agesubmit>false</agesubmit>
<label-z>false</label-z>
<xmlfile>false</xmlfile>
<default-age>18</default-age>
</ageblock-labeltype>
<ageblock-labeltype-definition>
<labeltype-httpheader-definition>
<label class="name1">
<scope>*.example.com/*</scope>
</label>
</labeltype-httpheader-definition>
</ageblock-labeltype-definition>
</age-declaration>
Single page rating using HTTPHEADER
Using HTTPHEADER is the best option to implement age rating for single pages of your website. It's easy:
Set the <httpheader>false</httpheader> in the age.xml to "true":
<httpheader>false</httpheader>
and define a <ageblock-labeltype-definition> in the age.xml like this:
<ageblock-labeltype-definition>
<labeltype-httpheader-definition>
<label class="name1">
<scope>*.example.com/*</scope>
</label>
</labeltype-httpheader-definition>
</ageblock-labeltype-definition>
In the accordion above you have an example of the entire age.xml for HTTPHEADER.
Then you must bring the HTTPHEADER with the age rating of the single page to its header. The format is:
'X-content‐age: 12'
if this specific single page should not be shown to kids younger than 12 years old.
In a pure php-page it is easy to show a HTTPHEADER using code like this:
<?php
header('X-content-age: 12');
?>
Note: There should be no html and no empty lines before this code.
If you would like to provide e.g. content descriptors, feature descriptors or other information about single page content, you can do so using a MIRACLE database. Learn about this in section the "MIRACLE" section on this website.
Single page rating using HTMLMETA
We highly recommend using HTTPHEADER as it is the more fast and reliable solution. But if for some reason you can’t use the header, you may implement HTMLMETA tags in every single page as an alternative.
Set the <htmlmeta>false</htmlmeta> in the age.xml to "true":
<htmlmeta>true</htmlmeta>
and define a <ageblock-labeltype-definition> like this:
<ageblock-labeltype-definition>
<labeltype-htmlmeta-definition>
<label class="name1">
<scope>*.example.com/*</scope>
</label>
<labeltype-htmlmeta-definition>
</ageblock-labeltype-definition>
Then include in the meta tag section on top of every single HTML-page a meta tag of this format:
<meta name=ʺage‐meta‐labelʺ content=ʺage=16“ />
if this single page should be not shown to kids younger than 16 years old.
If you would like to provide e.g. content descriptors, feature descriptors or other information about single page content, you can do so using a MIRACLE database. Learn about this in the "MIRACLE" section on this website.
Single page rating using PHRASELABEL
Phraselabels are to be used only if you have no chance to use HTTPHEADER or HTMLMETA tags because phraselabels risk being unexpectedly mislabeled with one’s own or user-generated content. Nevertheless, phraselabels are much better than doing nothing; in some technical environments, they are the only way to implement single page ratings.
First, you have to set <phraselabel>false</phraselabel> in the age.xml to true:
<phraselabel>true</phraselabel>
then you have to find or define a phrase on your single pages shown only on pages with the age rating needed and not shown on other pages. You define this phrase in the age.xml and give it an age. Example:
<ageblock-labeltype-definition>
<labeltype-phraselabel-definition>
<label class="name1">
<scope>*.example.com/*</scope>
<phrase>only for adults</phrase>
<phrase>splatter movie</phrase>
<age>18</age>
</label>
<labeltype-phraselabel-definition>
</ageblock-labeltype-definition>
In this case all pages containing text like “only for adults” and “splatter movie” will be blocked for kids younger than 18 years old. Be aware that this example also covers phrases like “these movies are not only for adults” and choose the phrases carefully. Phrases should not include either html tags or special characters like ä % § etc., as they are often shown differently in the html.
To make sure pages not containing the defined phrases are shown you should also set the <xmlfile>false</xmlfile> to true:
<xmlfile>true</xmlfile>
and define another labletype within <ageblock-labeltype-definition>:
<labeltype-xmlfile>
<label class="website">
<scope>*.example.com/*</scope>
<age>12</age>
</label>
</labeltype-xmlfile>
This <labeltype-xml> must be below the <labeltype-phraselabel-definition> inside the <ageblock-labeltype-defintion> because order means priority in the age.xml. Also the <xmlfile>true</xmlfile> must be below the <phraselabel>true</phraselabel> inside <ageblock-labeltype> tag.
Do not simply use the default age to make age ratings for all other pages, as parental control systems which are not able to read phraselabels would then use the default age for the entire website and in this case would show the adult pages to everyone.
Age rating using AGESUBMIT
The option <agesubmit>true</agesubmit> gives a website the possibility to dynamically show only content for the right age. For example, to the minor surfing the website a video portal might show only safe videos or a gaming portal only safe games.
To learn how it is implemented see the age.xml definition paper.
Your own parental control using LABEL-Z
Maybe you have your own parental control solution such as checking the age of every registered user by e.g. passport number or using time control (water sheding), showing content not suitable for minors only at night. In this case you might use the <label-z>true</label-z> solution to tell parental control systems not to block any of your pages. This is useful as parental control systems often block “unknown websites” up to a specific age, like 12 years. By using the label-z they get to know you care about protection of minors your own way.
To learn how label-z is implemented, see the age.xml definition paper.