A casino spam hack hides thousands of gambling pages inside a normal WordPress site so attackers can steal its Google rankings, and it usually comes with hidden admin accounts that let them back in after a basic cleanup. We found exactly this across a network of 25 law firm websites we manage, all sharing the same hosting. Here is the full story of what we found, why the first cleanup did not hold, and the step-by-step way we cleared all 25 for good.

In this case study
Casino spam, sometimes called a gambling or "togel" hack, is a type of SEO spam injection. The attacker does not deface your site. Instead they quietly add hundreds or thousands of hidden pages about online casinos, betting, and gambling, then point search engines at them. The goal is to borrow your domain's trust with Google so those spam pages rank.
Because the pages are hidden from normal visitors, most owners never see them. The first sign is usually indirect: a Google warning, a sudden flood of strange pages in Search Console, or rankings that quietly slide. For a law firm, where trust is everything, having gambling pages tied to your domain is a serious problem. If you suspect this, our guide on the signs your WordPress site is hacked covers the early warning signals.
The trigger was a Google Search Console audit on one site. The property was showing thousands of indexed URLs that should not exist, all with casino and betting keywords. That one finding raised an obvious question: if this site is infected, and it shares hosting and a management pattern with two dozen others, how many of the others are infected too?
So we ran the whole network. Rather than trust each site's dashboard, we checked every site from the outside and the inside:
The result was worse than expected. The infection was present, in one form or another, on the large majority of the network. A file-level cleanup had already been done weeks earlier, but the sites were still serving spam. That told us the real problem was not in the files at all.
Once we mapped it, the attack had a clear and repeatable fingerprint. The same components showed up site after site, which is typical of an automated campaign that hits a whole hosting environment at once.
Every infected site had one or two rogue administrator accounts that we did not create. They used throwaway names and were added straight into the database, not through the normal WordPress screens. These are the reason a hack comes back: even after you clean the files, the attacker simply logs back in with their hidden admin and reinfects the site. Finding and deleting these is the single most important step most cleanups skip.
Each site also had a handful of injected rows in the WordPress settings table. These stored the attacker's configuration: which spam to serve, where to pull it from, and how to regenerate it. A file scanner never looks here, which is exactly why the earlier file cleanup did nothing to stop the spam.
On many sites the attacker dropped a small loader file into the must-use plugins folder, a directory WordPress runs automatically on every page load and that most owners never open. It re-injected the malware even after the visible theme files were cleaned. The spam content itself was published under a ghost author, a fake user whose only posts were Spanish-language betting pages. Cleaning required removing the author and every post tied to it, carefully, so we did not touch legitimate content.
The pattern that mattered: file malware, database admins, injected settings, and a must-use-plugin loader all worked together. Remove only the files and the database half quietly rebuilds the infection.
This is the part owners find hardest to believe. The sites had security tools, and an earlier cleanup had run, yet they were still spamming Google. Three reasons:
This is the same reason a cheap, automated clean so often fails. If you want the detail, we wrote a full SEO spam cleanup playbook and a breakdown of what malware removal actually costs.
Because the infection had the same fingerprint everywhere, we built one tested cleanup and ran it carefully across the network, verifying each site by hand afterward. The sequence:
The order matters. We removed the database accounts and the loader before the visible files, because cleaning files first just gives the attacker a window to rebuild while you work. Doing it in the wrong order is why so many "cleaned" sites get reinfected within days. We cover this trap in our guide on spam redirects.
Removing the malware stops the bleeding, but it does not undo the damage already in Google's index. Thousands of casino URLs had been crawled and stored. Cleaning the site does not delete them from search overnight. So the recovery had a second half, done in Search Console for each affected property:
If your site has already been flagged, our guide on what to do when Google flags your WordPress site walks through the review process step by step.
Five takeaways from cleaning 25 sites at once, in case you are facing the same thing:
The whole network is clean today, monitored, and on a maintenance routine that catches this kind of thing early. That is the real lesson: the cleanup is the emergency, but ongoing maintenance and monitoring is what keeps it from happening again.
$199 within 2 business days, or $299 the same day. Full refund if we cannot clean it.
Start a repair →It is an SEO spam hack where an attacker injects hidden gambling and betting pages into your site to hijack its Google rankings. The pages are usually shown only to search engines, so the site looks normal to you while spam quietly piles up in search results.
Because the infection was not only in the files. It also lived in the database as hidden admin accounts and injected settings, plus a loader in the must-use plugins folder. If those survive, they rebuild the spam within days. A complete cleanup has to clear the database and the files together.
Yes. Automated attacks often target a whole hosting environment through a shared access path, so one compromised site is a strong signal to check every other site that shares that hosting or login pattern.
Removing the malware is fast, often within a day. Getting the spam URLs out of Google's index takes longer, usually a few weeks, as Google recrawls the site, drops the dead pages, and lifts any warning after a review.
Free site check, plain report, no sales call.
or email contact@backstopweb.com