You search for your own site and Google shows pages in Japanese, usually selling cheap brand-name goods, under your domain. That's the Japanese keyword hack. Attackers use your site's reputation to rank their spam. Fixing it takes two jobs: cleaning the site, then cleaning Google's index.
What the hack does
The attacker plants a script that generates large numbers of spam pages on request, often thousands of them, with Japanese titles and text that link to counterfeit shops. The pages usually don't exist as WordPress posts, so you won't see them in your dashboard. Many versions use cloaking: they show spam to Google's crawler and a normal page, or a redirect, to everyone else.
To speed up indexing, attackers often verify themselves as an owner of your site in Google Search Console and submit their own sitemaps.
How to confirm it
- Search Google for
site:yourdomain.com, and alsosite:yourdomain.com japanorsite:yourdomain.complus a brand name. Japanese titles under your domain confirm it. - In Search Console, check the Security issues report, the Pages report (a sudden jump in indexed or discovered URLs) and Sitemaps (sitemaps you didn't submit).
- In Settings → Users and permissions, look for owners you don't know.
- Open one of the spam URLs. If it shows your normal page or a 404, that's cloaking. Use Search Console's URL Inspection, "Test live URL", to see what Google gets.
Where the spam generator hides
- PHP files with random or plausible names in the WordPress root,
wp-includes,wp-content/uploadsor theme folders. - Rules in
.htaccessthat send unknown URLs to the generator script. - Modified core, theme or plugin files, especially
index.phpandfunctions.php. - Cached spam content stored in the database or in files the generator writes.
- Backdoors and rogue admin users that let the attacker put it all back. See WordPress Backdoors: How Reinfection Happens.
Cleaning the site
- Take a full copy of files and database first.
- Remove unknown owners from Search Console and delete their verification files or meta tags from the site.
- Replace WordPress core with a clean copy and compare plugins and themes with their official versions.
- Remove the generator files and the
.htaccessrules; check every site in the same hosting account. - Remove rogue users and backdoors, update everything, change all passwords and replace the security keys.
The full sequence is in the WordPress Malware Cleanup Checklist.
Cleaning Google's index
- Make sure every spam URL now returns 404 or 410, including for Google's crawler.
- Don't block the spam URLs in robots.txt. Google has to crawl them to see they're gone.
- Delete the attacker's sitemaps in Search Console and submit your own clean sitemap.
- Use the Removals tool for the most visible URLs. It hides them temporarily while Google recrawls.
- If there's a Security issue, request a review. See "This Site May Be Hacked" in Google: How to Remove It.
Thousands of spam URLs can take weeks to drop out of the index. That's normal as long as they return 404 or 410. Details in How to Remove Spam Pages From Google After a WordPress Hack.
Want it handled for you?
SEO spam hack removal covers this hack from cleanup to Search Console. Cleanups start from $199.
Further reading
Dealing with this on a live site?
Send us the details and we'll tell you what we'd do and what it would cost.