> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mottostreaming.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Domain pinning

> Limit the domain names that video can be played from

## Introduction

Motto offers the ability to enhance your video protection by limiting the web domains that your video can be played from.
This means that unauthorized websites will not be able to play your video content, thus preventing your content from
leaking and costs increasing unnecessarily.

This feature only works on web browsers and is not supported on mobile apps that attempt to play your video content.

## Get Started

You can get started using the Motto Studio, which we recommend for non-technical users. Alternatively, you may get started by using the Motto API.

<AccordionGroup>
  <Accordion title="Via the Studio">
    To enable domain pinning, first navigate to the "Settings" section in the Motto Studio, and select the "Video protection" tab.
    Here you can create a new ruleset by clicking the "New ruleset" button, or edit an existing ruleset if you are
    already applying other protection measures to the same content.

    In the creation form, you can check the option to enable domain pinning. In the textarea that appears, enter one
    domain per line that you wish to allow playback from.

    Each item should take the format of `example.com`, `subdomain.example.com` or `*.example.com` (for wildcard matching).
  </Accordion>

  <Accordion title="Via the API">
    To enable domain pinning, you must [create a video protection ruleset](/reference/studio-api/streaming/video-protection/v1/create-ruleset)
    with the `allowed_domains` array containing the domains you wish to allow playback from.
    Each item should take the format of `example.com`, `subdomain.example.com` or `*.example.com` (for wildcard matching).
  </Accordion>
</AccordionGroup>

Make sure to apply the ruleset to the content you wish to protect by selecting the appropriate target(s).
For more information, see [selecting a target](/guides/streaming/video-protection/target-selection).

The ruleset should apply within one minute of saving it. You can also update the ruleset at any time, and the changes will similarly apply within roughly one minute.

<Note>
  Domain pinning relies on the `referrer` and `origin` headers, which are not commonly used in mobile/TV apps, are not always reliable on web. These headers can be spoofed by the client, so this should not be used as the only security measure.
</Note>

## Next Steps

Have a look at any of the other rights protection features that Motto offers:

* [Geo-blocking](/guides/streaming/video-protection/geo-blocking)
* [VPN blocking](/guides/streaming/video-protection/vpn-blocking)
* [hotlink prevention](/guides/streaming/video-protection/hotlink-prevention)
* [registration walls](/guides/streaming/video-protection/registration-walls)
* [entitlement verification](/guides/streaming/video-protection/other)
* [DRM](/guides/streaming/video-protection/other)
