Nội dung
In this article, AZDIGI will show you to use hotlink protection to prevent embedding your images on other websites.
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 block embedding images on other websites.
II. Prevent image embedding with hotlink protection on aaPanel
Step 1: Log in to aaPanel control
You need to log in to aaPanel to start the setup. The default login path is http:ip:8888
. If you have lost your login information, you can refer to the article below:
Step 2: Enable Hotlink Protection
You click on the Website section and then click on the website to be protected.
Next, select Hotlink Protection and tick Enable hotlink protection to enable it. I will explain so you can understand better.
Note:
- URL suffix: The suffix of the link (for example, https://azdigi.com/blog/wp-content/uploads/2021/06/Screenshot-2021-06-25-at-23.02.55.png); the
.png
section is the URL suffix - Access domain: Allow embedded domains. Outside of this list, it won’t work.
- Response: On other websites, the embed will return HTTP code 404
- Enable hotlink protection (the main feature): you tick to activate.
III. Check hotlink protection
Now I will create another website demo and embed the image link. And turn on Inspect on the browser to check.
The result below shows that although the image link is embedded, it cannot be used.
- Request URL: The image link is taken
- Status Code: Returns 404
Wishing you success!
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
- Refer to the best hosting at https://azdigi.com/