Prevent hotlinking on IIS server.

One common method to prevent other websites from stealing your server resources is to set up anti-leeching on the IIS server. Here is a typical configuration method:

  1. Open the IIS manager, locate the website you want to set up anti-theft chain protection for, right-click and select “Properties”.
  2. Select the “HTTP Headers” tab in the “Properties” window.
  3. Click on the “Add” button in the “HTTP Headers” tab.
  4. In the “Custom HTTP Response Headers” dialog box, enter the “Name” as “Referer” and the “Value” as “Deny” (indicating refusal of hotlinking), then click “OK”.
  5. Click the “Add” button in the “HTTP Headers” tab.
  6. In the “Customize HTTP Response Headers” dialog box, enter the “Name” as “Referer” and the “Value” as “http://alloweddomain/” (allowed domains, separated by commas), then click “OK”.
  7. After confirming the settings, save and close the “Properties” window.

After this setting, only websites listed under “allowed domains” can access server resources, while requests from other unauthorized domains will be denied.

bannerAds