WordPress Security ServicesMalware Removal
SEO Spam Removal

Pharma Hack & SEO Spam: Get Your Google Results Back

Your site looks normal, but Google shows thousands of pages in Japanese, or about pills, casinos or fake brand goods, all under your domain. That's an SEO spam hack. It's built to stay invisible to you while feeding spam to Google. I remove it, take back control of your Search Console, and help you clear the spam out of Google.

$95 for one infected WordPress site

Includes a 1-month hassle-free guarantee. Multiple infected sites are priced separately. Guarantee terms

Sergey, WordPress security specialist
Top Rated 100% Job Success 10 years · 200+ sites cleaned
Signs of an SEO spam hackSYMPTOMS
  • Strange pages in Google
    Japanese text, pharma, casino or replica products under your domain.
  • Indexed pages exploded
    Search Console shows thousands of pages you never created.
  • Unknown Search Console owners
    Someone else verified ownership of your site.
  • Your site looks completely normal
    The spam is only shown to Googlebot, never to you.

What an SEO spam hack is

Attackers break into WordPress sites to borrow their reputation in Google. Your domain has history and trust; a brand-new spam site doesn’t. So they use yours to publish thousands of pages selling fake goods, pills, gambling, or links to their other sites. The best-known version is the Japanese keyword hack, which fills your search results with Japanese-language product pages. Pharma and gambling spam work the same way.

The spam usually doesn’t appear in your WordPress dashboard, and your visitors don’t see it either. It’s served only to search engines, a trick called cloaking.

The most common variants I see are the pharma hack (pages for viagra, cialis, kamagra and other pills), gambling and casino spam, payday loan spam, the Japanese keyword hack, and Chinese or Russian spam. They all work the same way, and a site “infected with SEO spam” usually has several of them at once.

How to confirm it

  1. Search Google for site:yourdomain.com. Then add words like viagra, casino or replica. Pages you never wrote mean an infection.
  2. Open Search Console → Pages. A sudden jump in indexed pages is a classic sign. One site I’ve seen went from about 60 indexed pages to several thousand in a few days.
  3. Use URL Inspection → Test live URL on one of the spam URLs. If Google sees spam where your browser sees a normal page, the site is cloaking.
  4. Open Settings → Users and permissions. Any owner you don’t know is a red flag.

Where the spam comes from

Part of the hack What it does
A spam generator PHP code, often in the theme, a fake plugin, or a file in the site root, that creates spam pages on request
Cloaking code Checks if the visitor is Googlebot and serves spam only then
Spam stored in the database Thousands of hidden posts, or spam content stored in options or custom tables
Rogue sitemaps Fake sitemap files submitted to Google to get the spam indexed quickly
Hijacked Search Console The attacker verified ownership of your site to control indexing
Backdoors Hidden files that let the attacker put it all back after a cleanup

How I remove SEO spam

  1. Find the generator and cloaking code, by comparing what Googlebot sees with what you see, then tracing it back to the code.
  2. Remove the stored spam from the database without touching your real content.
  3. Remove the backdoors and anything that would restore the spam, then find and close the entry point.
  4. Take back Search Console. I’ll help you remove unknown owners and their verification files, delete rogue sitemaps, and submit your own clean one.
  5. Make spam URLs return 404 or 410, so Google knows they’re gone for good.
  6. Speed up the cleanup in Google with the Removals tool for the worst URLs, and a review request if Google flagged the site as hacked.

A typical case: a small business notices its traffic dropping and its Google results suddenly showing Japanese product pages. The site itself looks fine. Search Console shows two Gmail accounts the owner has never heard of listed as verified owners, and indexed pages jumped from about 60 to several thousand in one week. The cause is a spam generator hidden in a fake core file plus a cloaking check, installed through an outdated plugin. Removing them, kicking out the fake owners and submitting a clean sitemap stopped the spam the same day. The Japanese pages dropped out of Google over the following weeks.

What recovery looks like

Expect the site to be clean right after the cleanup, and Google to catch up gradually. Spam URLs drop out over a few weeks as Google recrawls them. If Google flagged the site with a “This site may be hacked” warning, the review after cleanup can take several weeks. For more on the recovery side, see hacked website recovery.

Common Questions

SEO Spam FAQ

Why can't I see the spam pages on my site?

Because the malware shows different content to different visitors. It checks whether the request comes from Google's crawler and only then serves spam. You, visiting in a normal browser, get your normal site. Google's URL Inspection tool in Search Console shows you what Googlebot actually sees.

How long until the spam disappears from Google?

After the cleanup, spam URLs start dropping out as Google recrawls them and finds them gone. That usually takes a few weeks, sometimes longer for very large infections. The Removals tool in Search Console can hide the worst URLs faster in the meantime.

Will my rankings recover?

In most cases, yes, once the spam is gone and Google has recrawled the site. The longer the spam was live and the more pages it created, the longer recovery takes. That's why it's worth acting quickly.

Someone else is listed as an owner in my Search Console. Is that part of the hack?

Very likely. Attackers verify themselves as owners of hacked sites so they can submit their own spam sitemaps and watch how the spam performs. Remove them, delete their verification files or tags, and only then submit your own clean sitemap.

Do I need to delete the spam pages one by one?

No. The spam pages usually aren't real WordPress posts. They're generated on the fly by malicious code, or stored in bulk in the database. Removing the generator and the stored spam takes them all down at once. Then they need to return a 404 or 410 so Google drops them.

Clean up your search results

Spam pages in Google under your domain?

Send me your domain and a screenshot of what Google shows. I'll find the spam generator and start cleaning.

$95 per infected site · 1-month guarantee · direct contact with the specialist

Request Malware Removal →