cPanel Hotlink Protection – Protect your images and files from being copied

Hotlink Protection is a cPanel tool that prevents the images, videos and other files of your site from being embedded directly in other websites.
Simply put, it stops third parties from using your files (such as images or PDFs) in their own content while consuming the bandwidth of your server.

Without Hotlink Protection, another website can display your images using their URL directly, so they are loaded from your server.
This means unnecessary resource usage, higher costs and lower speed, especially in shared hosting environments.


When you enable Hotlink Protection, cPanel adds special rules to your account's .htaccess file.
These rules check which domains are allowed to load files such as JPG, PNG, GIF, CSS, JS, PDF or MP4.
If a request for a file comes from an external domain that has not been allowed, the request is rejected or replaced with an error message.


Enabling Hotlink Protection is recommended when:

  • You notice that other websites are using your images directly.

  • You want to reduce bandwidth usage and server load.

  • You manage a high-traffic site or one with many media files.

  • You want to protect your content from unauthorized use.


  1. Log in to cPanel.

  2. In the Security section, select Hotlink Protection.

  3. If it is disabled, click Enable.

  4. In the “URLs to allow access” field, add your domains (e.g. example.com, www.example.com).
    These are the domains that will be able to load images from your server.

  5. In the “Block direct access for these extensions” field you can set which file types will be protected (e.g. jpg, jpeg, png, gif, bmp, pdf, mp4, css, js).

  6. Optionally, you can allow the request when it comes from a known bot (such as Googlebot) so that search results continue to display correctly.

  7. Click Submit to save the changes.

Once it is enabled, your images will no longer load on other websites.


If for some reason you need to temporarily allow access from other websites, you can disable it:

  1. Log in to cPanel.

  2. Select Hotlink Protection again.

  3. Click Disable.

  4. The related rules will be removed from .htaccess and your files can once again be displayed by any site.


Example 1: Protecting product images
An e-shop notices that its product images are displayed on another website.
With Hotlink Protection enabled, these images will no longer load on the other website.

Example 2: Preventing content theft
A blog finds that other sites embed its articles with inline images loaded from its server.
Enabling Hotlink Protection cuts off this connection immediately.

Example 3: Reducing bandwidth usage
In shared hosting environments, every request for files increases bandwidth usage.
By enabling Hotlink Protection, unnecessary resource usage is significantly reduced.


Tips and best practices

  • Always add your domain and your subdomains to the “Allowed URLs” list.

  • If you use a CDN (such as Cloudflare or BunnyCDN), also add the CDN URLs so that you do not block your own images.

  • After enabling it, check that your images load normally on your site.

  • If you use a CMS such as WordPress or Joomla, make sure that your caching settings are not affected by .htaccess.


Frequently Asked Questions

Does Hotlink Protection affect Google rankings?
No, as long as you have allowed access for the Googlebot domains so that the search engine can keep seeing your images.

Can I make an exception for specific websites?
Yes, you can add any site you want to have access to your files to the Allowed URLs list.

How will I know if someone is hotlinking?
You can spot it in the cPanel access logs or in Awstats, where you will see requests from external domains for your files.

Does it also protect PDFs or videos?
Yes, as long as you have added the corresponding file extensions to the Blocked Extensions list.



Conclusion

cPanel Hotlink Protection is a simple but very useful tool that protects the content and resources of your site.
By enabling it, you prevent other websites from using your images and files without permission, keep bandwidth usage lower and maintain the speed and reliability of the server.

On Konet servers, enabling Hotlink Protection together with LiteSpeed Web Server and Imunify360 provides an extra layer of security for every hosted website.

Was this article helpful?

Related service Konet Web Hosting cPanel, LiteSpeed and automatic backups: 24 every 2 hours for 48 hours, then 6 daily, 4 weekly and 3 monthly.

Related articles