The bot management module of Web Application Firewall (WAF) allows you to configure anti-crawler rules for websites and apps. You can configure anti-crawler rules for your native iOS or Android apps to protect your services against crawlers. HTML5 apps are not native iOS or Android apps. This topic describes how to configure anti-crawler rulers for apps.
Prerequisites
- WAF 3.0 is activated. For more information, see Activate WAF 3.0.
- Web services are added as protected objects in WAF 3.0. For more information, see Manage protected objects.
- Anti-Bot SDK is integrated into the apps that you want to protect. For more information, see Integrate the Anti-Bot SDK into Android apps and Integrate the Anti-Bot SDK into iOS apps.
Create an anti-crawler rule template for apps
FAQ
If an exception occurs during the Verify Protection Effect step, refer to the following table to resolve the issue.
Error | Cause | Solution |
---|---|---|
No valid test requests are detected. See WAF documentation or contact us to analyze the possible causes. | The test request failed to send or is not sent to WAF. | Make sure that the test request is sent to the IP address that maps the CNAME provided by WAF. |
The header fields in the test request do not match the header fields that you configured for Traffic Characteristics in the anti-crawler rule. | Modify the settings of Traffic Characteristics in the anti-crawler rule. | |
The originating IP address of the test request is different from the public IP address that you specified in the anti-crawler rule. | Use the correct public IP address. We recommend that you click Alibaba Network Diagnose Tool to obtain your public IP address. | |
The test requests failed the verification. See WAF documentation or contact us to analyze the possible causes. | No real user access is simulated. For example, the debugging mode or automation tools are used. | Simulate real user access during the test. |
An incorrect service type is selected. For example, Websites is selected when you configure an anti-crawler rule for apps. | Change the value of the Service Type parameter. | |
An intermediate domain name is used, but an incorrect intermediate domain name is selected in the anti-crawler rule. | Select Use Intermediate Domain Name. Then, select the correct intermediate domain name from the drop-down list. | |
Compatibility issues occur in the frontend. | Contact customer service in the DingTalk group or submit a ticket. | |
No verification is triggered. See WAF documentation or contact us to analyze the possible causes. | No test rules are generated. | Perform the test several times until a test rule is generated. |
No valid test requests are detected or blocked. See WAF documentation or contact us to analyze the possible causes. | The test request failed to send or is not sent to WAF. | Make sure that the test request is sent to the IP address that maps the CNAME provided by WAF. |
The header fields in the test request do not match the header fields that you configured for Traffic Characteristics in the anti-crawler rule. | Modify the settings of Traffic Characteristics in the anti-crawler rule. | |
The originating IP address of the test request is different from the public IP address that you specified in the anti-crawler rule. | Use the correct public IP address. We recommend that you click Alibaba Network Diagnose Tool to obtain your public IP address. |