Chapter 4 · 4.8
Hotlink Protection
Other websites can place images from your site directly on their own page, by linking to your file. This is called hotlinking. Your package then supplies the data traffic, while the visitor is on another site. With Hotlink Protection you block this.
How it works
When retrieving an image, a browser indicates which page the request comes from (the referrer). Hotlink Protection checks this. If the request comes from a site that isn't on your list, that site won't receive the image.
Setting it up
- Select the domain in the top right and click Hotlink Protection under Account Manager.
- In the list of URLs (1), add the addresses that are allowed to show your images. Type in an address, for example https://www.yourdomain.com, and click ADD. Be sure to add the addresses of your own site, as well as any other sites that are allowed to use your images.
- Protected file types (2) shows the file types that are protected, separated by commas. By default, these are jpg, jpeg, gif, bmp, ico, svg and png.
- Leave Allow Blank Referrer (3) on. This means people can still open an image directly.
- Under Redirect to (4), choose what a blocked site gets: 403 Forbidden (no image) or a URL, for example an image with your logo.
- Click SAVE (5) and then MODIFY HOTLINK PROTECTION to turn on the protection.

Please note: The list can't be empty. If there are no allowed addresses in it, DirectAdmin immediately turns the protection off again. You'll then see the message Hotlink protection is disabled because there are no allowed domains.
Pitfalls
- Images on your own site stop working. Add all addresses of your site to the list: with and without www, your pointers and your subdomains. If you use a CDN, add that address too.
- Your images disappear from Google Images or from posts on social media. These also fetch your images from a different address. If you want them to keep working, add them to the list, or only protect the file types that really need it.
- You get a 403 error on images. This could be the hotlink protection. Turn it off for a moment to test.
You can turn off Hotlink Protection on the same page using the button that disables the protection.
