How to set up hotlink protection
- Category : cPanel Question
- Posted on : Sep 14, 2020
- Views : 650
- By : HostSEO
The normal practice of adding website files is to upload and store them directly on the server your account is hosted on, or to pay for special image/file hosting and link to it. Hotlinking is a direct linking to another website’s files. In other words, it is used to display images, video, etc. on one’s website by actually loading them from someone else’s website, consuming hosting account bandwidth of the latter.
For regular small or medium websites, this might not be an issue, but if you have an image-heavy site and there is a lot of hotlinking going on, you can end up exceeding your monthly bandwidth limit and be charged additional fees. So in terms of account resource usage optimization, it makes sense to prohibit hotlinking.
You can do this using the Hotlink Protection tool in cPanel. The steps are as follows:
for cPanel paper_lantern theme
for cPanel x3 theme
for cPanel paper_lantern theme:
1. Log into your cPanel.
2. Select the Hotlink Protection option in the Security section:
3. Turn on Hotlink protection by clicking on Enable:
URLs to allow access – indicate websites which you wish to allow access to your files. These may be your own websites or some other trusted online resources. By default, cPanel adds all domains hosted in the account to this box, however, this list can be edited if required.
Block direct access for these extensions – specify the file types you wish to block access to.
You need to check the Allow direct requests box if you want visitors to be able to check a protected file by typing its URL directly in the browser.
In the Redirect request to this URL text box, you can optionally type a URL everyone who tries to hotlink to your files will be redirected to.
If you are in need of raw .htaccess rules to block hotlinking, you can use these rules.
NOTE: There are some disadvantages of having hotlink protection enabled. For instance, you may have trouble displaying your images in your RSS feeds or email newsletters (adding the domain of your RSS or newsletter provider to your list of allowed URLs may help). Be sure to weigh the pros and cons of this feature before enabling it.
for cPanel x3 theme:
1. Log into your cPanel.
2. Select the Hotlink Protection option in the Security section:
3. Turn on Hotlink protection by clicking on Enable:
URLs to allow access – indicate websites which you wish to allow access to your files. These may be your own websites or some other trusted online resources. By default, cPanel adds all domains hosted in the account to this box, however, this list can be edited if required.
Block direct access for these extensions – specify the file types you wish to block access to.
You need to check the Allow direct requests box if you want visitors to be able to check a protected file by typing its URL directly in the browser.
In the Redirect request to this URL text box, you can optionally type a URL everyone who tries to hotlink to your files will be redirected to.
If you are in need of raw .htaccess rules to block hotlinking, you can use these rules.
NOTE: There are some disadvantages of having hotlink protection enabled. For instance, you may have trouble displaying your images in your RSS feeds or email newsletters (adding the domain of your RSS or newsletter provider to your list of allowed URLs may help). Be sure to weigh the pros and cons of this feature before enabling it.
That's it!
Categories
- cPanel Question 47
- cPanel Software Management 29
- cPanel Tutorials 13
- Development 29
- Domain 13
- General 19
- Linux Helpline (Easy Guide) 156
- Marketing 47
- MySQL Question 13
- News 2
- PHP Configuration 14
- SEO 4
- SEO 42
- Server Administration 84
- SSL Installation 54
- Tips and Tricks 24
- VPS 3
- Web Hosting 44
- Website Security 22
- WHM questions 13
- WordPress 148
Subscribe Now
10,000 successful online businessmen like to have our content directly delivered to their inbox. Subscribe to our newsletter!Archive Calendar
Sat | Sun | Mon | Tue | Wed | Thu | Fri |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
Recent Articles
-
Posted on : Sep 17
-
Posted on : Sep 10
-
Posted on : Aug 04
-
Posted on : Apr 01
Tags
- ts
- myisam
- vpn
- sql
- process
- kill
- tweak
- server load
- attack
- ddos mitigation
- Knowledge
- layer 7
- ddos
- webmail
- DMARC
- Development
- nginx
- seo vpn
- Hosting Security
- wireguard
- innodb
- exim
- smtp relay
- smtp
- VPS Hosting
- cpulimit
- Plesk
- Comparison
- cpu
- encryption
- WHM
- xampp
- sysstat
- optimize
- cheap vpn
- php-fpm
- mariadb
- apache
- Small Business
- Error
- Networking
- VPS
- SSD Hosting
- Link Building
- centos
- DNS
- optimization
- ubuntu