Procédure
The HTTP error code 509 means that the site is exceeding the resource limits provided by its hosting plan. The server then temporarily refuses to process part or all of the requests associated with the hosting plan.
Two limits can trigger this error:
Error 509 is not a block and therefore cannot be lifted manually, either by the client or by support. It disappears automatically as soon as the site's usage drops back below the limits of its plan.
If the error returns regularly, the cause of the overuse is still present: it must be identified and addressed (see the following sections).
In practice, error 509 most often appears in one of the following cases:
The website access log is the main source for understanding which requests are causing the error.
The comparison in step 4 is decisive. A tool like Google Analytics works in JavaScript: it only counts real visitors whose browser executes the script. If the access log shows far more requests than the visits measured by Analytics, the difference is very likely due to robots, an attack, or automated calls.
Unknown or suspicious URLs in the log (pages you did not create, paths to unusual PHP files) should make you think of a hack.
To permanently stop error 509, two options are available:
Before considering a migration, it is recommended to check in the logs that the traffic is indeed legitimate: migrating a hacked site or one bombarded by robots does not solve the cause.
The robots.txt file, placed at the root of the site, tells SEO and AI bots which pages they can crawl. You can use it to forbid entire directories or certain AI bots you do not need. You can also define a minimum waiting time between crawling two pages.
Example:
User-agent: GPTBot
Disallow: /
User-agent: Claudebot
Crawl-Delay: 60
User-agent: *
Disallow: /panier/
Disallow: /*?filtre=This is particularly useful when your website is overwhelmed by crawling bots. Indeed, since the rise of AI training bots, some bots carry out maximum crawling, sometimes unnecessarily. For example, AI bots are particularly known for trying every possible combination of filters and sorting on product listing pages.
Beyond the wasted bandwidth from this type of crawling, SEO and AI bots may consider that your website has far too many pages. They may thus stop crawling before finishing the exploration of your entire website, which hurts your SEO. It is in your interest to limit the pages crawled so that the bots can focus on the pages that provide the most value in terms of SEO and GEO.
Respectful bots follow these rules; malicious bots ignore them, which is why the following tools are useful.
LWS Protect includes three useful protections against error 509:
See the LWS Protect documentation for more information.
The Fastest Cache caching system makes it possible to serve a pre-generated version of pages. The server no longer runs PHP / Node.js / Python or database queries for each visit, which reduces resource usage and loading time. This is particularly important for a page targeted by an advertising campaign.
If the page in question is dynamic (contains parts that vary depending on the connected visitor, the connected country, etc.), you can implement partial caching: first load the page skeleton and the static content that is identical for all visitors, then load the dynamic content via an asynchronous JavaScript request. You can thus cache the static content.
To learn more about using Fastest Cache, see the product documentation.
If the site goes through Cloudflare, “Under Attack” mode imposes a verification step on visitors before they can access the site. It is useful during a DDoS attack, but should be disabled once the attack is over because it slows down visitors’ first access.
Ask the LWS team and the community. Answers are published after moderation.