Adding RSL to Web Pages
RSL licenses can be applied to individual web pages by declaring the license in the page’s <head>
section. This can be done either by embedding the license using a <script>
tag, or by linking to an external RSL license file using a <link>
tag. In both uses, if the url
attribute of <content>
element is set to ""
, the license is a template that applies to the parent web page.
Example: Embedded License
The example below shows how to embed an RSL license directly in a page using a <script>
tag with type="application/rsl+xml"
. This method allows the license to be machine-readable without affecting the content or layout of the page.
<head>
<script type="application/rsl+xml">
<rsl xmlns="https://rslstandard.org/rsl">
<content url="" server="https://rslcollective.org/api">
<license>
<permits type="usage">train-ai</permits>
<payment type="royalty">
<standard>https://rslcollective.org/license</standard>
</payment>
</license>
</content>
</rsl>
</script>
</head>
Example: Linked License
Alternatively, you can reference an external RSL license file using a <link>
tag. The type="application/rsl+xml"
attribute explicitly identifies the file format, allowing crawlers and RSL-compatible tools to recognize and process the link correctly.
<head>
<link rel="license"
type="application/rsl+xml"
href="https://example.com/license.xml">
</head>