百度智能云

All Product Document

          CDN

          Set the Hotlink Protection

          Set Referer Blacklist and Whitelist

          Introduction to the Principle

          CDN accesses the referer header in HTTP request, and matches with the referer blacklist/whitelist in the configuration, and Reject/Let off the requests that are matched.

          Notes

          • For verified domain names, you have to set hotlink protection to protect your website link from being stolen by other websites.
          • CDN allows the users to configure referer blacklist/whitelist by themselves, and the users can set hotlink protection in the "Hotlink Protection" tab on the detailed page of domain name.
          • The user can configure 100 Referer blacklists/whitelists at most.
          • The system does not default to enable the hotlink protection feature, which needs to be configured by users themselves.

          Operation Steps

          1.Log into the CDN Management Console and enter the “Content Delivery Network (CDN) " page.

          2.Click Domain Name Management on the left navigation bar.

          3.Enter the domain name management page, and click the Management of the target domain name operation column.

          4.Enter the “CDN Domain Name Details " page, and select the Access Control tab in the navigation bar at the top of the page.

          5.Enter the access control page, click Edit in the setting module of Hotlink Protection.

          6.Enter the hotlink protection configuration interface and find the setting area of Referer blacklist and whitelist.

          7.Select Whitelist Takes Effect or Blacklist Takes Effect. Set the IP blacklist and whitelist corresponding to the domain name, and separate them by carriage returns.

          Hotlink protection domain name matching rule

          • For the referer configuration of the existing stock, remain the matching policy unchanged. Only support fuzzy matching in the form of *.a.com/*.
          • The matching method for the referer hotlink protection configuration of the New and Stock Update after December 6, 2019 is of domain name level, and supports to add wildcard character to match with the subdomain name, such as: *.test.com. 。
          • Protocol settings are not distinguished for Referer. You do not have to enter http: // or https: as the prefix. //,If you are configuring the address of http: //zoe.baidu.com, just enter zoe.baidu.com.

          8.Set Enable or Disable the "Null Referer":

          • Enabled: Allow Referer to be empty. When the Referer of the http request Header is empty, access is allowed, and CDN returns information normally. Referer is allowed to be empty by default.
          • Closing: Referer should not be empty, disallowed access prevents the returned information.

          9.Click OK to take effect the configuration.

          Note Click "Edit" to delete all Referer blacklists/whitelists corresponding to the domain name, and the data will not be recovered after deletion, please operate with caution.

          Set IP Blacklist/Whitelist

          Introduction to the principle

          CDN accesses to the client IP, and matches with the IP blacklist/whitelist in the configuration, and Reject/Let off the client requests that are matched.

          Notes

          • For verified domain names, you have to set IP blacklist and whitelist to protect your website link from being stolen by other websites.
          • CDN allows the users to configure IP blacklist/whitelist by themselves, and the users can set IP blacklist/whitelist in the "Access Control" tab on the detailed page of domain name.
          • The user can configure 100 IP blacklists/whitelists at most.
          • The system does not enable the IP blacklist and whitelist feature by default, and you have to configure it by yourself.

          Operation Steps

          1. Log into the CDN Management Console and enter the “Content Delivery Network (CDN)" page.
          2. Click Domain Name Management on the left navigation bar.
          3. Enter the domain name management page, and click the Management of the target domain name operation column.
          4. Enter the “CDN Domain Name Details" page, and select the Access Control tab in the navigation bar at the top of the page.
          5. Enter the access control page, click Edit in the setting module of Hotlink Protection.
          6. Enter the configuration interface of hotlink protection and locate the setup area for IP Blacklist/Whitelist.
          7. Select Whitelist Takes Effect or Blacklist Takes Effect. Set the IP blacklist and whitelist corresponding to the domain name, and separate them by carriage returns.
          8. Click OK to take effect the configuration.

          image.png

          Note: All IP blacklists/whitelists corresponding to the domain name after clicking "Edit" to remove the IP address, and the data will not be recovered after deletion, please operate with caution.

          Set User-Agent Blacklist and Whitelist

          Introduction to the principle

          CDN accesses the User-Agent in HTTP request header, and matches with the blacklist/whitelist in the configuration, and Reject/Let off the requests that are matched.

          Notes

          • The user can configure 100 User-Agent blacklists/whitelists at most.
          • The system does not enable the User-Agent blacklist and whitelist feature by default, and you have to configure it by yourself.

          Operation Steps

          1.Log into the CDN Management Console and enter the “Content Delivery Network (CDN)" page.

          2.Click Domain Name Management on the left navigation bar.

          3.Enter the domain name management page, and click the Management of the target domain name operation column.

          4.Enter the “CDN Domain Name Details" page, and select the Access Control tab in the navigation bar at the top of the page.

          5.Enter the access control page, click Edit in the setting module of Hotlink Protection.

          1. Enter the hotlink protection configuration interface, and find the User-Agent Hotlink Protection Configuration area.

          image.png

          7.Select Whitelist Takes Effect or Blacklist Takes Effect. Set the User-Agent blacklist and whitelist corresponding to the domain name, and separate them by carriage returns.

          8.Click OK to take effect the configuration.

          Note: After clicking “Edit", you can delete all User-Agent blacklists and whitelists corresponding to the domain name. Data cannot be restored after cleared.

          Previous
          Cache Configuration
          Next
          Advanced Authorization