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

# Hotlink protection

> How to prevent other websites from embedding your images and files, saving your bandwidth.

Hotlinking happens when another website embeds files (usually images) hosted on your account by linking directly to your URLs. Their visitors see the content, but your account serves the files and uses your bandwidth.

Hotlink protection blocks these requests so that only your own site (and any other domains you allow) can serve your files.

## Enable hotlink protection

<Steps>
  <Step title="Open the hotlink protection settings">
    Log in to cPanel through your [client area](https://my.speedypage.com) or at `yourdomain.com/cpanel`. Go to **Security** > **Hotlink Protection**.
  </Step>

  <Step title="Enable protection">
    Click **Enable**.
  </Step>

  <Step title="Add allowed URLs">
    In the **URLs to allow access** field, add any domains that should be permitted to link to your files. Your own domain is usually pre-filled, but check that it's listed. Include variations like `www.yourdomain.com` and `yourdomain.com`.

    If you use a CDN or a subdomain that serves content, add those too.
  </Step>

  <Step title="Specify protected file types">
    In the **Block direct access for the following extensions** field, enter the file extensions you want to protect, separated by commas. Common choices:

    `jpg,jpeg,gif,png,webp,svg,bmp`
  </Step>

  <Step title="Configure optional settings">
    * **Allow direct requests** — select this if you want people to access files by typing the URL directly into their browser. If unchecked, direct URL access is also blocked.
    * **Redirect the request to the following URL** — enter a URL here to redirect hotlink attempts to a specific page (for example, your homepage or a "hotlinking not allowed" notice).
  </Step>

  <Step title="Save">
    Click **Submit**.
  </Step>
</Steps>

## Disable hotlink protection

In the Hotlink Protection interface, click **Disable**.

<Warning>
  Disabling hotlink protection deletes your list of allowed URLs. Save your list somewhere before disabling so you don't have to re-enter everything if you turn it back on.
</Warning>

## Things to keep in mind

* Always include your own domain (with and without `www`) in the allowed URLs list. If you don't, your own site won't be able to display its own files.
* If you use webmail or access cPanel at your domain, include those URLs as well (e.g. `yourdomain.com:2083`).
* Hotlink protection works by checking the HTTP referer header. Some browsers, privacy tools, and VPNs strip this header, which can cause false blocks.
* If your site uses a CDN, add the CDN's domain to the allowed list so it can pull files from your origin server.

<Tip>
  Hotlink protection is most useful if you host large files (images, downloads, videos) and notice unexpected bandwidth usage. If your bandwidth is fine and your content is small, you may not need it.
</Tip>
