Nội dung
In this article, AZDIGI will show you to use hotlink protection to prevent embedding your images on other websites.
Refer to the high-speed hosting service here.
I. Should we prevent embedding images on the web?
I think it should because imagine your website is in the field of real estate or comics and there are a lot of images on the website that are directly linked to other people’s websites.
Then the first thing you will notice is that your website must run heavier because when users visit those other websites, your hosting will also have to serve the images on that person’s website.
And you get almost nothing out of it. Instead, the beneficiary is the person who embeds your image on their website, helping their hosting package run smoothly and with less bandwidth.
So in this article, I will help you prevent that with the hotlink protection feature on aaPanel to help prevent embedding images on other websites.
II. Prevent image embedding with hotlink protection on aaPanel
To prevent image embedding with hotlink protection on cPanel, we need to follow these 3 steps.
Step 1: Access to cPanel interface
To access to cPanel, please refer to the following tutorial:
Step 2: Find and access the Hotlink Protection feature
On cPanel, you enter the Hotlink keyword search bar to find this feature.
At the interface of this feature, you will see that this feature is turned off by default (1) as shown below: You can refer to the interface of this feature below:
I will explain the fields in this interface:
- Enable: Enable Hotlink Protection feature.
- URLs to allow access: – enter the URL you want to permit linking to your files. By default, this will automatically get the domains on your hosting package.
- Block direct access for the following extensions (comma-separated): – you can enter the file extension that you want to block direct embedding.
- Allow direct requests – select this option if you want to allow direct access from the browser (for example, when opened with the path http://yourdomain.com/image.png).
- Redirect the request to the following URL: – If you want you can redirect the blocked request to a certain URL, for example, one of your domain’s pages. You will need a valid URL of the form http://yourdomain.com/index.php.
- Click Submit to save all changes.
That’s it, now your files on hosting are protected from being used by unwanted websites.
Note: If you find that files such as images or videos don’t work after enabling HotLink protection, make sure your domain has been added to the list of URLs to allow access (2).
Now, you can check if the other websites have been blocked from embedding images.
III. Summary
In this tutorial, AZDIGI showed you how to enable HotLink Protection on cPanel on your website. It will help you block image embedding and help save your site’s bandwidth from being misused by others without your permission.
Wishing you success!
See more useful cPanel articles at the following link:
If you need assistance, you can contact support in the ways below:
- Hotline 247: 028 888 24768 (Ext 0)
- Ticket/Email: You use the email to register for the service and send it directly to: support@azdigi.com .