Targeted cPanel site by an influx of bots or requests: what to do?

Procédure

When your cPanel site receives an unusual volume of requests (crawlers, overactive tool, attack), it may slow down and your hosting protections may block some visits. First identify where these requests are coming from in your logs, check that a legitimate address is not blocked, then reduce the influx, from the simplest measure to the strongest: robots.txt, LWS Protect, Cloudflare. This is not a hosting outage.

Spot the influx in your logs

  1. Open the Access Log

    In cPanel, under Metrics, click Logs, then Access Log, and View on the line for your domain (today's log) or a file from the Archived log files list (previous days).

  2. Look for what comes up most often

    Each line corresponds to a request: it shows in particular the visitor's IP address, the date and time, the requested address, the HTTP code returned, and the browser or bot name (User-Agent). During the problem periods, look for the IP addresses, bot names, or pages that appear most often: those are the ones that need to be slowed down or filtered.

  3. Check the LWS Protect log

    In the same Logs tool, the LWS Protect log lists requests already blocked by LWS Protect, with the IP address and a description in English. How to read it is explained in the help article LWS Protect blocking page on cPanel: understand and unblock access.

Unblock a legitimate IP address

If a specific address (yours, a client's, or a service's) remains blocked:

  1. Open the check

    In cPanel, under Security, click Firewall (the page is titled "Firewall"), then Check if an IP is blocked. The IP address field contains your own connection address: replace it with the blocked person's or service's address if needed.

    cPanel Firewall form « Check if an IP is blocked »
  2. Check then unblock

    Click Check. If the address is blocked, click Unblock: the request is processed automatically within a few minutes.

Reduce the volume of requests

Start with the simplest measure and go further only if the influx continues.

  1. Guide bots with the robots.txt file

    The robots.txt file, at the root of the site, tells crawlers what they can browse; serious bots respect it. The procedure is explained in the help article HTTP Error 509: understand, diagnose, and resolve.

  2. Filter bots with LWS Protect

    In cPanel, under Security, open LWS Protect, click Customize on the line for the relevant domain, then the Bots tab. Note the current state of the rules, switch useful rules to On, for example Block/limit SEO bots (Ahrefs, Semrush, Majestic) and Block malicious bots, then click Save changes. To go back, switch the rule back to Off and save.

    LWS Protect Bots tab: SEO bot and malicious bot rules
  3. Only during an attack: aggressive Anti-DDoS

    If the influx continues after the previous steps, open the Generic tab of LWS Protect, switch Aggressive Anti-DDoS to On, then click Save changes. New visitors will then see a short verification in their browser before accessing the site.

    LWS Protect Generic tab: Aggressive Anti-DDoS option
  4. Put the site behind Cloudflare

    For a large or repeated influx, Cloudflare filters visits before they reach your hosting: see How do I configure Cloudflare on a website hosted on cPanel?.

Lighten your site

A lighter site handles an influx better. Check that the server cache, Fastest Cache (under Performance), is enabled: see Fastest Cache: speed up your site with Varnish and NGINX. For WordPress, the LWS Optimize extension complements this cache.

If the influx comes from your own tool

A script, synchronization, monitoring tool, or test tool can also get blocked:

  • space out calls, especially to the same page;
  • avoid sending many requests at the same time;
  • give the tool a name (User-Agent) that identifies it honestly.

Check that everything works

Open several pages of the site from the connection that was blocked, or from another device: they display normally. If you enabled "Aggressive Anti-DDoS", make sure it has been switched back to Off once the influx is over.

Common issues

The address does not appear as blocked in the Firewall

Check that the address entered is indeed the blocked connection's address: by default, the field shows your own connection address. If it is the correct address, reduce the influx (previous section) and try again a little later.

The problem returns right after unblocking

The influx is still there: apply the measures in the "Reduce the volume of requests" section, or slow down your own tool.

The problem continues anyway

Contact LWS support and provide the problem times with your time zone, the addresses of the pages involved, the code or text visitors see, the blocked IP addresses if you know them, and, for a blocking page, the "Request ID" and "IP Address" lines at the bottom of the page.

Related articles

help.lws.net/a/8191
Was this article helpful?

Yes

No

Read 1 times

Thank you! Feel free to ask questions about our documentation if you would like more information, and help us improve it.

Similar articles

Need more help?

A question about this article?

Léo, our assistant, answers you straight away based on our articles.

A problem with your account?

Our technical support team handles your request by ticket, from your customer area.

Open a ticket