How to Stop Other Sites Hotlinking Your Images Print

  • 0

Hotlinking is when another website shows your images (or other files) by linking straight to them on your server. Their visitors use up your bandwidth, and you get nothing in return. cPanel's Hotlink Protection stops other sites loading your files while your own pages keep working.

Turn on Hotlink Protection

  1. Log in to cPanel and open Security › Hotlink Protection.
  2. If it says hotlink protection is disabled, click Enable.
  3. Check the URLs to allow access list. It should include every address your own site uses, with and without www and with both http:// and https://, for example:
    https://example.co.uk
    https://www.example.co.uk
    Add any subdomains or other sites of yours that should be able to use the files.
  4. In Block direct access for the following extensions, list the file types to protect, separated by commas, for example jpg,jpeg,gif,png,webp,svg.
  5. Leave Allow direct requests ticked. That lets people open an image by typing its address or from a bookmark, and avoids breaking some apps and previews.
  6. If you like, enter an address in Redirect the request to the following URL to show a replacement image or page instead.
  7. Click Submit.

Afterwards, open your site in a private window and check your own images still load. If some are missing, the allowed list is missing an address your site uses.

Turn it off

Open Security › Hotlink Protection again and click Disable.

Good to know

  • Hotlink protection may stop your images appearing in some search engines' image results or in social media link previews. Weigh that against the bandwidth you save.
  • If your site runs through Cloudflare, you can use Cloudflare's own hotlink protection setting instead, which blocks hotlinks before they reach our server. See using Cloudflare with your EDZNET hosting.

Was this answer helpful?

« Back