Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Stop other sites from using your images (hotlink protection)

This guide shows how to turn on hotlink protection in cPanel, so other websites cannot show your pictures using your bandwidth.

cPanel2 min read12 steps

What is hotlinking?

Hotlinking happens when another site shows your image by linking straight to your server. Their visitors see your picture, but your server does the work. It is like a neighbour who uses your water hose to fill their pool. It uses your bandwidth. Bandwidth is the amount of data your site sends out. Too much can slow your site down.

Hotlink protection tells your server to send your files only when the request comes from your own sites.

Steps to turn it on

  1. Log in to cPanel.
  2. Under the Security section, click Hotlink Protection. You can also search for it at the top.
  3. Look at the list called URLs to allow access. cPanel often adds your own domains for you. Make sure all your sites are listed, including the version with www and the one without.
  4. Check the box Block direct access for these extensions. Fill in the file types to protect, separated by commas. For example:
    jpg,jpeg,gif,png,webp
    These are common image types. You can add others, such as mp4 for video.
  5. Decide on Allow direct requests. If you tick it, people can still open the file by typing the address in the browser. This is usually safest to tick.
  6. Optional: type a web address in Redirect the request to this URL. A blocked site will then show this picture instead of yours. Use a link to a small warning image on your own site.
  7. Click Submit.

Test that it works

  1. Open your site and check that your images still show.
  2. Try your own pages with and without www.
  3. If images are missing, add the missing domain to the allow list.
Warning: If you use a CDN, social media sharing, or email newsletters that show your images, add those web addresses to the allow list. Otherwise pictures may not appear there.

Turn it off

  1. Go back to Hotlink Protection.
  2. Click Disable Hotlink Protection.

Hotlink protection works through your .htaccess file. This is a small file that holds server rules for your site.

Quick recap

  • Hotlinking is when another site uses your files and your bandwidth.
  • Open Hotlink Protection in cPanel and list your allowed sites.
  • Choose file types to protect and click Submit.
  • Test your site and add any trusted partners to the allow list.