Web Hosting provides an access control feature to block malicious IPs and limit concurrent connections (that is, limit access frequency). This reduces the risk of a DDoS attack on your website. You can also monitor connection details in real time to promptly identify anomalies and ensure your website's security and stability.
Limitations
Support for access control to block malicious IPs and limit concurrent connections depends on the Web Hosting instance type. The following table provides details.
|
Instance type |
Operating system |
Description |
|
Shared Web Hosting |
|
Access control to block malicious IPs and limit concurrent connections is not supported. |
|
Exclusive Web Hosting |
Linux |
|
|
Windows |
|
For Web Hosting instance types that do not support the console access control feature, you can block malicious IP addresses using the following alternative methods:
-
Exclusive Web Hosting (Windows, economy edition): The console does not include an access control entry. Open the File Manager in the console, navigate to your website root directory, and edit the
web.configfile to add IP blocking rules. Example:<configuration> <system.webServer> <security> <ipSecurity allowUnlisted="true"> <add ipAddress="192.168.0.1" allowed="false" /> <add ipAddress="192.168.0.0" subnetMask="255.255.255.0" allowed="false" /> </ipSecurity> </security> </system.webServer> </configuration> -
Exclusive Web Hosting (Linux, non-enhanced edition): Edit the
.htaccessfile in the website root directory and add blocking rules. Example:Order Deny,Allow Deny from 192.168.0.1 Deny from 192.168.0.0/24 -
Exclusive Web Hosting (Linux, enhanced edition): Modify the Nginx configuration file to block IP addresses. Example:
deny 192.168.0.1; deny 192.168.0.0/24;
Usage notes
-
When adding IP addresses to the IP blacklist, note the following:
-
You can block one or more malicious IP addresses.
-
To add multiple malicious IP addresses or IP address ranges, separate them with a comma (,) or a line break. For example,
192.168.0.1,192.168.0.0/24blocks the IP address 192.168.0.1 and the IP address range 192.168.0.0/24. -
You can enter up to 500 IP addresses, but you cannot block the
127.0.0.1address. -
After you block a malicious IP address, the specified IP address or IP address range cannot access your website or its FTP service.
-
-
When limiting concurrent connections to control access frequency, note the following:
-
Limiting concurrent connections for each IP address or IP address range can mitigate the impact of DoS and DDoS attacks.
-
When setting a connection limit, set the value higher than the limit for common browsers. For example, most browsers allow about six concurrent connections per domain. Setting a lower value might degrade browser performance.
-
A limit that is too low can block access for multiple users sharing a single outbound IP address, such as users in an office.
-
Block malicious IPs
Blocking malicious IPs prevents them from accessing your website. If your website's connections are at their limit, block malicious IPs to ensure normal access for legitimate users.
- Log on to the Cloud Web Hosting management page.
- Find the Cloud Web Hosting instance you want to manage and click Manage in the Actions column.
-
In the left-side navigation pane, click Access Control.
-
On the IP Blacklist tab, click Add IP.
-
In the Add IP dialog box, enter the malicious IP address or IP address range in the IP field.
-
Click OK.
The added IP address appears in the list.
NoteTo remove one or more blocked IP addresses, select the IP addresses in the list, and then click Delete in the Actions column. Alternatively, click Batch Delete at the bottom of the list. In the message that appears, click OK.
Limit concurrent connections
A concurrent connection limit is the maximum number of simultaneous TCP connections a server allows. For example, if the limit is 10, a maximum of 10 connections can be active on the server at one time.
- Log on to the Cloud Web Hosting management page.
- Find the Cloud Web Hosting instance you want to manage and click Manage in the Actions column.
-
In the left-side navigation pane, click Access Control.
-
Click the Connection Limit tab.
-
In the Connection Limit Settings section, click [Enable Limit].
By default, the connection limit status is Disabled.
-
In the [Enable Limit] dialog box, enter the concurrent connection limit and connection mask.
The connection mask defines the network mask for the connection limit. The value can be any integer from 0 to 32, inclusive. The default value is 32. To enter a connection mask, first click Advanced Settings, and then enter a value based on your requirements.
For example, if the concurrent connection limit is 10, a connection mask of 32 indicates that each source IP address can have a maximum of 10 connections. A connection mask of 24 limits each C-class network (/24 subnet) to a total of 10 connections. A connection mask of 0 limits the entire website to a total of 10 connections.
-
Click OK.
After you set the limit, you can view the Connection Limit Status, Concurrent Connection Limit, and Connection Mask details.
-
(Optional) Modify or disable the connection limit.
-
Modify limit: If the current settings do not meet your needs, click [Modify Limit] in the Connection Limit Settings section. In the Modify Limit dialog box, change the concurrent connection limit and connection mask, and then click OK.
-
Disable limit: To disable the feature, click [Disable Limit] in the Connection Limit Settings section. In the confirmation message, click OK.
-
Monitor website connections
Web Hosting lets you monitor website connections in real time. You can hover over a point on the connection usage graph to view connection details for that specific time.
- Log on to the Cloud Web Hosting management page.
- Find the Cloud Web Hosting instance you want to manage and click Manage in the Actions column.
-
In the left-side navigation pane, click Access Control.
-
In the Monitoring Information section of the Access Control page, view the website connection status.
Web Hosting provides two ways to view connection statistics: Statistics by Source IP and Statistics by Connection Type.
-
Statistics by Source IP

-
Statistics by Connection Type

-
Identify abnormal traffic and malicious IPs
If you notice a sudden spike in traffic or connection count, follow these steps to locate the source and block malicious IPs:
-
Download and analyze access logs: Download the website access logs from the console File Manager. Sort log entries by IP address to identify the IPs or IP ranges with the highest request volumes.
-
Block subnets for large-scale attacks: If the attack involves many distributed source IPs, it is more efficient to identify the attack IP range and block entire subnets in CIDR notation. For example, entering
220.181.51.0/24blocks all IP addresses in that subnet. -
Distinguish malicious traffic from legitimate crawlers: High-frequency requests are not always malicious. Before blocking an IP, check whether the traffic is from legitimate search engine crawlers (such as Googlebot or Bingbot) or from malicious scrapers (such as YisouSpider or AhrefsBot). Blocking search engine crawler IP ranges may cause your website to be removed from search indexes.
FAQ
My website is still inaccessible or traffic has not decreased after blocking an IP address. What should I do?
Scenario 1: The website remains under attack after blocking a specific IP address
The attack sources may be distributed across multiple IPs. Recommended actions:
-
Analyze the access logs to identify the IP pattern, and block the entire C-class subnet in CIDR notation. For example, entering
220.181.51.0/24blocks all addresses in that range. -
Enable the concurrent connection limit on the Connection Limit tab to prevent resource exhaustion from high volumes of simultaneous connections.
Scenario 2: Traffic statistics still show requests after blocking
Traffic still appearing in statistics does not necessarily mean the block is ineffective. Check the HTTP status codes in the access logs:
-
403: The IP address has been successfully blocked.
-
302: A URL rewrite rule may have processed the request before the IP block, causing a redirect. Actual access is still denied.
Scenario 3: Restarting the instance does not resolve the issue
If the problem persists after a restart, the cause may be a configuration file syntax error or a rule conflict. Recommended actions:
-
Check configuration files (such as
.htaccessorweb.config) for syntax errors. -
After restarting the Web Hosting instance, wait approximately 10–15 minutes for the cache to clear and the blocking rules to take full effect.
How do I block malicious crawlers or specific User-Agents (such as Amazonbot or SemrushBot)?
The access control feature in Web Hosting only supports blocking by IP address or IP address range. It does not support filtering by User-Agent. You can use the following alternative methods:
-
robots.txt: Create or edit the
robots.txtfile in the website root directory to addDisallowrules for specific crawlers. Note thatrobots.txtonly works for compliant crawlers and does not technically enforce blocking.User-agent: AhrefsBot Disallow: / User-agent: SemrushBot Disallow: / -
.htaccess (Exclusive Web Hosting, Linux non-enhanced edition): Add rewrite rules to deny access based on the User-Agent string.
RewriteEngine On RewriteCond %{HTTP_USER_AGENT} (AhrefsBot|SemrushBot|Amazonbot) [NC] RewriteRule .* - [F,L] -
Nginx configuration (Exclusive Web Hosting, Linux enhanced edition): Add rules to block requests by User-Agent.
if ($http_user_agent ~* "(AhrefsBot|SemrushBot|Amazonbot)") { return 403; } -
Block by IP address: If the crawler uses a fixed IP address, you can block it directly using the console access control feature. See Block malicious IPs in this document.
Does Web Hosting support IPv6 access or blocking of spoofed IPv6 requests?
Web Hosting currently operates in an IPv4-only environment and does not support IPv6 access.
If your analytics tools display what appear to be IPv6 addresses in traffic data, this is likely due to client-side IP spoofing or differences in how the analytics tool processes address formats—not actual IPv6 traffic reaching your server. Analyze the actual source IPs at the IPv4 level and use the console access control feature or the file-based methods described in this document to block them.
Related documents
-
To improve the security of your website on a Web Hosting instance, configure different files to specify access permissions. This prevents malicious IP addresses from accessing your website and protects against hotlinking and resource scraping. For more information, see Improve website security by blocking malicious IP addresses.
-
On Exclusive Web Hosting Linux non-enhanced edition instances, an incorrectly configured file, such as the .htaccess file, can cause high CPU or memory usage, which can make the website inaccessible. To resolve this issue, block IPs or limit concurrent connections. For more information, see Troubleshoot website inaccessibility due to high CPU or memory usage.