Skip to content
RedWebDesign
Hacked website

Japanese or pharma spam pages in Google, on your domain

You searched for your company and see results under your own domain with Japanese characters, offering counterfeit brands or medicines, yet you find nothing like that on your site. This is not a Google error but a well-known attack. I explain how it works and how to get rid of it.

Ferenc KulcsárUpdated: 30 October 2026Reading time: about 4 min

A hand pointing at a “SPAM” label surrounded by colourful envelopes

What is this attack?

In what Google calls the “Japanese keyword hack”, attackers create hundreds or thousands of pages on your domain, usually in Japanese or Chinese, advertising counterfeit brands, casinos or medicines. The pharma hack is a similar variant, where English-language ads for erectile dysfunction drugs and other medicines appear.

Their aim is not to harm your visitors, but to use your domain’s reputation. A long-established, legitimate company site is stronger in Google’s eyes than a freshly registered spam domain, so the attackers try to rank their pages under your name.

Why can’t you see it on your site?

The spam pages are not added to your menu, and often are not shown to visitors either. The malicious code checks who is requesting the page: it shows the spam to Google’s crawler, and the normal page or an error page to an ordinary visitor. This trick is called cloaking.

That is why the owner may not know about the infection for months, and only notices when searching for their own company, or when traffic drops.

How to check

In practice

In practice · a real case, anonymised

Thousands of new pages every night in an online shop

System
WordPress, WooCommerce
Source
a cracked (“nulled”) theme
Technical repair
about 4 hours

In an online shop, a back door hidden in a cracked theme created a hidden administrator account. Through it, the attackers not only infected the checkout page but also created thousands of Japanese and Chinese casino and pharmacy pages in the database every night.

After the cleanup these pages were gone, but they did not disappear from Google overnight. They dropped out of the results gradually, in the usual way.

How do the results disappear?

There are two separate jobs: stopping the infection, and clearing its traces from Google.

1. Stopping the infection

This is the same as for any other hack: closing the entry point, removing the code from the files and the database, changing the access details. I described it in the article on cleaning WordPress.

2. Clearing the spam pages from Google

  • The spam URLs should return “not found” (404 or 410). Do not redirect them to the home page: Google treats that as suspicious and removes them more slowly.
  • Delete the sitemaps submitted by the attackers from Search Console, along with owners you did not add.
  • In urgent cases, the Search Console “Removals” tool lets you temporarily hide the worst results. This is not permanent deletion; it only buys time.
  • Resubmit your own, clean sitemap, so that Google crawls the site again as soon as possible.
  • If Google reported a security issue or a manual action, request a review (here is how).

The results disappear at Google’s pace, usually over weeks, and with a large number of spam pages it can take months. The recovery of your search rankings is not automatic either, and nobody can guarantee it.

How to prevent it

This attack comes in through the same gaps as the others: an outdated plugin, a cracked theme, a leaked password. I have collected the prevention steps in the security checklist. Most importantly, have your site registered in Search Console, because that is where Google tells you if it finds strange pages.

Foreign results on your domain? I stop the infection and also take care of clearing it out of Google.

Frequently asked questions

Does this hurt my search rankings?

Yes. Google may mark the hacked site in its results, may also apply a manual action, and the spam pages draw attention away from your real content. After the cleanup, recovery is gradual.

Why can’t I redirect the spam URLs to the home page?

Because Google then treats them as if the pages still existed, just somewhere else. A 404 or 410 response clearly says these pages are gone, so they drop out of the results sooner.

How long until the results disappear?

Usually weeks, and months with a large number of spam pages. The worst ones can be hidden temporarily with the Removals tool until Google crawls the site again.

Can a Shopify or Wix site be hit by this attack?

Mass creation of spam pages is mainly typical of systems running on your own hosting (for example WordPress). On closed platforms, look for similar signs through the accounts and embedded third-party code.

Share Facebook LinkedIn
Ferenc Kulcsár
Ferenc Kulcsár I have been building, fixing and running websites for businesses since 2006. About me