PsDevs
Back to the blog

Cybersecurity · Technical journal

How to Prevent Mass Bot Web Scraping Through the WooCommerce and PrestaShop Search

Bots scraping through the internal search can bring your store down without selling anything. A layered guide to stopping them in WooCommerce and PrestaShop without blocking your customers or Google.

17 min read

Security shield stopping web scraping bots before they reach a WooCommerce or PrestaShop online store

It is one of the most common incidents in WooCommerce and PrestaShop stores: the site slows down, 503 or 504 errors appear, the admin panel takes forever to load, and the hosting provider warns that the CPU allowance has been exceeded. The odd part is that there is no active campaign, sales have not increased, and Analytics shows hardly any new visits.

When the server logs are opened, the cause is almost never a rush of buyers. It is a bot, or hundreds of them, firing thousands of searches at the store's internal search. Each search forces PHP and the database to work, and none of those visits is going to buy anything.

In this article I explain what web scraping is, how a web scraper works and how it gets into a store, why the search box is its favourite way in, and what it does to the server. At the end you will find a layered guide, with real configurations, to stop it in WooCommerce and PrestaShop without blocking your customers or Google.

What is web scraping, and what is a web scraper?

Web scraping is the technique of extracting data from a web page automatically instead of copying it by hand. A web scraper is the program that does it: it visits pages, reads their content, and saves what it is interested in to a spreadsheet or a database.

Web scraping is not bad in itself. Price comparison sites, SEO tools, researchers, and many companies use it to watch their own market. The problem appears when someone applies it to your store without your permission and at scale.

In an online store, a web scraper usually looks for:

  • Prices and stock, so a competitor can adjust theirs to the cent.
  • Product pages: descriptions, images, references, and categories.
  • Your entire catalog, to build a clone store, a marketplace, or feed a data service.

Whether web scraping is legal depends on the country, on which data is copied, and on how it is used, so it cannot be answered with a plain yes or no. What is certain is that, even when it is legal, it can leave your store without the resources to serve your customers. That is what this article is about.

What is a bot, and which types visit your store?

A bot is a program that visits web pages automatically, with no person clicking behind it. It does what a browser does: it requests a URL, receives the HTML, and processes it. The difference is scale: a person opens ten pages in a session, while a bot can request ten thousand in an hour.

Not all bots are enemies. It helps to tell three groups apart, because the solution is not the same for each one.

TypeExamplesDoes it identify itself?Does it respect robots.txt?What to do
Search enginesGooglebot, BingbotYes, and it can be verifiedYesLet them in, but not through the internal search
AI crawlers and SEO toolsGPTBot, ClaudeBot, Meta-ExternalAgent, Amazonbot, AhrefsBot, SemrushBotYesUsually, but not alwaysDecide case by case and limit their pace
Web scrapers and abusive botsCustom programs and automated browsers, with thousands of spread-out connectionsNo, they pose as a normal ChromeNoChallenge or block

The third group, the web scrapers, does the most damage to a store. They are competitors watching your prices and stock, people copying your catalog to set up another store or a marketplace, and services that sell product data to third parties.

How much traffic is really automated

The figures from the major security reports agree on the order of magnitude:

  • The Thales/Imperva Bad Bot Report 2026 puts automated traffic at 53% of the total in 2025, up from 51% in 2024. Malicious bots would account for around 40%.
  • The 2025 report had already warned that in retail, malicious bots reached 59% of traffic in that sector.
  • According to HUMAN Security, automated traffic grew 23.5% in 2025, compared with 3.1% for human traffic. Seven out of ten scraping attacks targeted retail, and ecommerce accounted for 37% of scraping traffic.
  • Decodo's scraping report estimates that ecommerce accounts for close to 18% of scraping requests, with peaks of 64% on Black Friday.

These figures should be read with caution: they are published by companies that sell bot protection, and each one measures in its own way. Even so, they all point the same way: a very large share of the visits your store receives are not people.

How a web scraper walks through your catalog using the search box

A bot does not need to "hack" anything. It walks in through the front door, because the search box is designed so that any visitor can ask for whatever they want without logging in. A typical scraper follows this path:

  1. It locates the search. It finds it in the header form, like any visitor, or in data your site publishes so that Google knows how to search it.
  2. It prepares a word list. Single letters, combinations of two or three letters, dictionary words, brands, and terms taken from your own categories. Searching for "ca" instantly returns every product containing those letters, so a few thousand terms are enough to walk through an entire catalog.
  3. It walks through every results page and every combination of filters (price, color, brand). Each combination is a different address, and the possibilities explode.
  4. It copies the data. From each result it takes the name, price, reference, stock, images, and link. If your store has autocomplete, even better for the bot: that feature returns the data already sorted and lightweight.
  5. It camouflages itself. It spreads requests across thousands of connections (sometimes from real homes), presents itself as a normal browser, and pauses at random. Each connection makes very few requests, so none looks suspicious on its own.

There is not always bad intent behind it. Many AI crawlers and SEO tools do not understand the context of a store either, and follow any endless URL variation, as Kinsta explains in its analysis of bot traffic on WooCommerce. For your server the effect is the same.

Why the search and not the product pages

  • Every term is unique. No cache can absorb it: each new search reaches PHP and the database.
  • It gives access to the whole catalog without following category links, including products that do not appear in the navigation.
  • It needs no cookies or session. A twenty-line script can use it.
  • It is among the most expensive things the store does. A few requests are enough to cause heavy consumption, even if the bot does not intend it.

There are also bots that are not after your data but want to use your search: they inject spam terms so that your site's results pages end up indexed in Google, or they try SQL injection and XSS strings against the search parameter.

Why a few hundred searches per minute can bring down a server

A search looks like just another request, but it is one of the most expensive a store handles. When hundreds or thousands arrive per minute, the server runs out of capacity to serve real buyers.

An analogy: the physical store with eight shop assistants

Imagine a store with eight shop assistants. A normal customer asks for a product and the assistant looks for it in the stockroom. Now imagine a thousand people arriving every minute, each asking for something different and with no intention of buying. The eight assistants spend the day running to the stockroom, the queue grows, and the customer who does want to pay ends up waiting out on the street.

That is what happens on a server. Each search forces the store to go through its whole catalog and build a results page from scratch. Another person's answer cannot be reused, because every searched word is different. A bot trying thousands of words unintentionally defeats every saving.

This is not a theoretical problem. Kinsta reported that, on its infrastructure, bots made more than 7 million requests to add-to-cart URLs in 24 hours, and that a single AI crawler reached 3.75 million requests in one day.

What you lose when it happens

  • Sales. The determined buyer sees a slow site or an error, and goes to another store.
  • Stability. The admin panel, order management, and connections with your ERP or marketplaces slow down or fail.
  • Money. On shared hosting you can be suspended for excessive consumption, and on your own server you end up paying for more power to serve visits that do not buy.
  • Reliable data. Visits, bounce rate, and conversion include non-human traffic, and you make marketing decisions with numbers that are not real.
  • Search ranking. If Google frequently runs into server errors, it reduces how often it visits your site and your new content takes longer to appear.
  • Your catalog. Your prices, your stock, and the work behind your product pages end up in the hands of competitors or in cloned stores.

How to tell whether it is happening to you

You do not need to know how to read server logs to suspect it. These signs should make you ask for a review:

  • The site is slow or shows errors (503, 504) without more sales or a running campaign.
  • Your hosting warns you about high CPU usage, exceeded limits, or processes that were cut off.
  • In Analytics you see visit spikes with almost no purchases, sessions of a few seconds, or a lot of traffic from a country where you do not sell.
  • If you have the internal search report, meaningless terms or sequences such as aa, ab, ac appear.

To confirm it, ask your hosting provider or your developer for a summary of the last 24 hours of traffic focused on the search: how many searches there were, from how many different connections, and which terms were searched. With those three figures, a bot can be told apart from a real customer peak in minutes.

How to stop web scraping: a practical guide without touching code

There is no magic solution. What works is combining several measures so that the bot is stopped as early as possible, before it reaches the store and makes it work. This table summarizes the seven measures. The times are approximate and are carried out by your developer or hosting provider; I explain what each one is and what to ask for.

MeasureWho does itApproximate effortEffectRisk of bothering customers
1. Put a "receptionist" in front (Cloudflare)Developer1 to 2 hoursHighLow
2. Anti-bot rules on the searchDeveloper1 to 2 hoursHighLow to medium
3. Limit searches per visitorHosting or developer1 to 3 hoursHighMedium if set too low
4. Politely ask crawlers to stay out (robots.txt)Developer or SEO30 minutesMediumLow
5. A lighter searchDeveloperFrom 2 hours up to a few daysHigh in the long termLow
6. Resource limits and server alertsHosting1 to 2 hoursMedium, contains the damageNone
7. Security plugin or moduleYou or your developer1 hourMediumLow to medium

1. Put a receptionist in front of the store

Cloudflare is a service that sits between your visitors and your server, like a receptionist who decides who comes in. It has a free plan and is the measure with the best ratio of effort to result, because it stops bots before the store spends a single resource.

There is a detail that is often forgotten. You must make the server accept only visits that come through Cloudflare. If a bot knows your server's real address, it walks in directly and skips all the protection. If that address was ever exposed, the most reliable fix is to change it.

What to ask for: "I want to put the store behind Cloudflare and have the server accept only connections coming from Cloudflare."

2. Anti-bot rules on the search

Once Cloudflare is in front, you can tell it to run an invisible check on anyone using the search (most people will not even notice it), except for Google and Bing, which do not have to pass it. You can also enable the free Bot Fight Mode option and, if you only sell in a few countries, require an extra check from visitors arriving from other countries or from data center networks, where your customers are not usually found.

There is an important caveat: that check needs to be displayed on screen, and the search autocomplete works in the background, with no screen. If it is applied there, autocomplete stops working for everyone. For that part, a rate limit (measure 3) is used, not a check.

What to ask for: "Create a rule in Cloudflare that adds a check to the search results pages, except for verified bots like Google. And test it before leaving it active so it does not bother my customers."

3. Limit how many searches each visitor can make

This is a doorman who lets each visitor make, for example, 30 searches per minute. A real person almost never reaches that. A bot does, and it meets a temporary block. It can be applied in Cloudflare, on the server, or in the store itself.

The limit has a trap: if your store has autocomplete, a person typing a single word fires several requests within a few seconds. That is why it is not advisable to go below about 20 to 30 per minute, and your developer should first measure how many a real customer generates. The safest approach is to run the limit for a day in test mode, which only records who it would have blocked, and review the list before turning it on for real.

What to ask for: "Limit searches to about 30 per minute per visitor. Put it in test mode first for a day and show me who it would have blocked."

4. Ask crawlers to stay out (robots.txt)

The robots.txt file is a sign on the door that says which areas of the store crawlers should not visit. It is used to tell them to stay out of the internal search, the filters, and the cart. Google, Bing, and many AI and SEO crawlers respect it, so it noticeably reduces legitimate noise.

Malicious bots ignore it, and they are not the only ones: according to Tollbit, close to 30% of AI bot scrapes violate explicit robots.txt instructions. It is a necessary measure, but never sufficient on its own. If your store ranks filter pages in Google, check first with whoever handles your SEO.

What to ask for: "Update the robots.txt so that crawlers stay out of the internal search, the cart, and the filters I do not need to rank."

5. A search that costs less

Everything above reduces the number of searches. This measure reduces what each one costs, and it improves the store even if there is no bot at all.

  • WooCommerce. The search that comes with WordPress goes through all the text of all the products on every search, and it becomes slow beyond a few thousand products. Plugins such as FiboSearch, Relevanssi, or SearchWP replace it with an index, like the one in a book, that finds products without going through everything. For large catalogs, an external service such as Algolia or Elasticsearch takes the load off the server.
  • PrestaShop. Under Shop Parameters > Search there are settings that lighten the search: disable fuzzy search (the one that corrects typos) if you do not need it, limit the maximum word length, and reindex. If the search statistics module is enabled, ask your developer to disable it or purge it from time to time, because it stores every bot search and the database grows out of control. For large stores there are external search services such as Doofinder or Algolia.
  • In either one. Keep results from going beyond the first 10 pages, because nobody looks at page 40 and a bot does. And close to anonymous visitors the public searches that WordPress and WooCommerce offer through their technical interface, which are another way in.

What to ask for: "I want a lighter search that does not go through the whole catalog on every query, that limits the results pages, and that does not allow the catalog to be queried through public interfaces."

6. Resource limits and server alerts

No defense is perfect. This measure means that, if something gets through, it cannot sink the whole server or the other sites you may host on it. Your hosting provider can assign each store a resource limit and warn you when the load spikes, before your customers find out.

What to ask for: "Can you set resource limits for this store and alert me when load or errors rise? Do you include anti-bot protection?"

7. Security plugin or module

In WordPress, security plugins such as Wordfence let you limit the request rate per visitor and block suspicious behavior. In PrestaShop there are modules with similar features. It is the most accessible option if you cannot use Cloudflare, but it acts inside the store, so the request has already consumed resources by the time it is blocked. It is recommended as a complement and not as the main measure.

What does not work (or barely works)

  • Blocking addresses one by one. A distributed scraper uses thousands and changes them. It helps for a few hours.
  • Trusting the name the bot presents itself with. It can be faked in one line.
  • Disabling PrestaShop's filter module. According to mypresta.rocks's analysis, requests keep arriving and consuming resources even with the module turned off.
  • Relying only on robots.txt. The bots causing the problem do not read it.
  • Removing the search. It solves the problem and you lose the sales of those who use it.

If it is happening right now

If the store is slow or down at this moment, it is not the time to fine-tune. These steps go from least to most drastic:

  1. Turn on Cloudflare's I'm Under Attack mode. It shows a check to all visitors and usually stops the bulk of automated traffic. Turn it off when the peak has passed, because it bothers buyers.
  2. Ask your hosting provider to temporarily limit or cut the searches while the pattern is studied. It is better to lose a few minutes of search than to leave the whole store down.
  3. Ask for the search traffic summary (how many searches, from how many connections, from which countries and networks, which words).
  4. With that pattern, create the permanent rules from measures 2 and 3.
  5. When the store can breathe, turn the search back on and complete the remaining measures.

Common mistakes

  • Putting the check on the autocomplete. It breaks the search for all your customers.
  • Setting the limit too low. A person typing fires several requests in a row. It has to be measured first.
  • Blocking Google by accident. After every change, look at the crawl stats in Google Search Console and check that errors are not rising.
  • Leaving the server directly accessible. If the bot knows its address, it skips everything.
  • Setting it up and forgetting it. Bots change techniques. Review the Cloudflare events and server consumption from time to time, especially during the first month.

How to know whether it worked

Compare before and after using the same indicators: store speed, server errors, the CPU usage your hosting reports, and odd visits in Analytics. If it worked, those numbers improve while your sales, Google visits, and your customers' use of the search stay the same. If the latter drop, some rule is too aggressive and needs to be softened.

Checklist

  • ☐ Ask my hosting provider or developer for the search summary of the last 24 hours
  • ☐ Put the store behind Cloudflare and close direct access to the server
  • ☐ Enable the anti-bot rules for the search, without bothering Google or Bing
  • ☐ Limit searches per visitor, in test mode first
  • ☐ Update robots.txt
  • ☐ Review the search: a lighter plugin or settings, and a limit on results pages
  • ☐ Ask the hosting provider for per-store limits and alerts
  • ☐ Review the results during the first month and check Search Console

Conclusion

Bots are not going away. According to the latest security reports, they are already more than half of internet traffic, and ecommerce is one of their favorite targets. Your store's search is one of the cheapest doors for them and one of the most expensive for you.

The solution is not a magic rule but a set of layers: filter at the door, limit the pace, politely ask crawlers to stay out, and make every search cost less. With that, the store stops being an easy target without bothering your customers or Google.

If you suspect your WooCommerce or PrestaShop store is suffering mass web scraping and you want me to review what is going on, you can contact me through psdevs.com. You can also look at our security and PrestaShop optimization services.

Sources

  • Thales/Imperva Bad Bot Report 2026 (TechRadar): 53% automated traffic and about 40% malicious bots in 2025.
  • Imperva Bad Bot Report 2025 (TechRadar): 51% automated traffic in 2024 and 59% malicious bots in retail traffic.
  • HUMAN Security, State of AI Traffic 2026 (Implicator): growth of automated traffic and the weight of retail and ecommerce in scraping.
  • Decodo, most scraped websites (TechRadar): 18% of scraping requests in ecommerce and Black Friday peaks.
  • Tollbit, State of the Bots (Digiday): AI bots that ignore robots.txt.
  • Kinsta, bot traffic on WooCommerce: request costs and crawler figures.
  • mypresta.rocks, filter overload in PrestaShop: why turning off the filter module does not stop the problem.

From reading to action

Is your store being scraped by bots?

Review my store traffic