A Web.com Partner

Prevent hotlinking for Joomla using cPanel

This tutorial will show you how to prevent hotlinking for Joomla using cPanel

Hotlink protection prevents other websites from linking to your images and files and thereby stealing your bandwidth

You’ll need to be logged in to your cPanel account to enable hotlink protection for your Joomla installation

1) Click Hotlink Protection

frame03_1106

cPanel should have automatically filled this box in for you. If that isn’t the case, you’ll need to type all domains and subdomains that should be able to access your files. Note that www is considered a subdomain and must be included explicitly

frame05_196

2) Add any additional domain names here

frame07_192

3) Now, specify any other file extensions for which to restrict access

frame09_179

Allowing direct requests lets people type the URL to a file in their browsers but not access it on a web page other than one specified

4) Click here to allow direct requests

frame11_175

By default, an error message will be displayed when someone triggers the hotlink protection. An alternative is to redirect the person to a URL specified here

5) Type a redirect URL here

frame12_161

6) Click Submit to activate Hotlink Protection

7) Click Go Back

frame13_150

With that done, hotlink protection is now enabled for all files in your public_html folder and every folder it contains. But what if you just want the Joomla folder to be protected?

8) Click Home

frame15_141

Scroll down

9) Click File Manager

frame16_143

10) Click Show Hidden Files

frame18_132

11) Click Go

12) The hotlink protection is saved in a file called .htaccess in the public_html folder. Right-click on it

frame20_130

13) Go to Copy

14) Now, enter the path to your Joomla directory and click Copy File(s)

frame21_139

Let’s verify that the .htaccess file contains the correct information

15) Double-click on the Joomla directory

frame23_126

Scroll down until you see .htaccess

16) Click the checkbox…

frame26_118

17) …then click Edit

18) Click Edit

frame27_126

This looks correct. Every domain name we entered shows up here…all the file types are here…and the redirect URL is here. If you enabled Direct Linking, this line will be here, too

frame28_116

19) Make any necessary changes, then click Save Changes

Now that Joomla has hotlink protection set up independently from cPanel, let’s disable it there

20) Click Disable

frame30_117

That’s all there is to it! Hotlink protection is now enabled only for your Joomla directory

x
Chat