Home WebServer PanelaaPanel How to use Hotlink Protection on aaPanel to prevent image embedding

How to use Hotlink Protection on aaPanel to prevent image embedding

by Thạch Phạm
Published: Last Updated on
A+A-
Reset

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.

How to use Hotlink Protection on aaPanel to prevent image embedding

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.
CleanShot 2022 01 05 at 13.26.57

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
CleanShot 2022 01 05 at 13.41.33

Wishing you success!

If you need assistance, you can contact support in the ways below:

Đánh giá

Tham gia nhóm hỗ trợ Server - Hosting

Tham gia nhóm Hỗ trợ Server - Hosting & WordPress để cùng nhau hỏi đáp và hỗ trợ các vấn đề về WordPress, tối ưu máy chủ/server.

Tham gia ngay

Bài viết cùng chuyên mục

AZDIGI – Không chỉ là đơn vị hàng đầu trong lĩnh vực Web Hosting và Máy chủ, chúng tôi mong muốn mang lại những kiến thức bổ ích nhất và luôn cập nhật thường xuyên cho cộng đồng người đam mê thiết kế website, công nghệ,…

Vui lòng không sao chép nội dung nếu chưa xin phép. Designed and Developed by PenciDesign