Learn as if you will live forever, live like you will die tomorrow.

   +1 555 87 89 56   80 Harrison Lane, FL 32547

HomeBlogWebsite SecurityThe Japanese Keyword Hack: Why Your Site Ranks for Japanese Spam

The Japanese Keyword Hack: Why Your Site Ranks for Japanese Spam

⚡ The fix in short
  • Confirm with Search Console’s indexed count and a Googlebot fetch of a spam URL
  • Delete the generator script and planted sitemap — check uploads and cache folders for PHP
  • Audit the database and cron for a reinstall mechanism before declaring it clean
  • Return genuine 404s for spam URLs, submit a fresh sitemap, and request removals in Search Console

This post is part of our series on WordPress attacks in the last 10 years — one major attack per day, what it was, how to detect it, how to remove it and how to keep it out. This instalment covers The Japanese Keyword Hack (2016 — still active today).

What happened

In the Japanese keyword hack (also called Japanese SEO spam), attackers who have compromised a site generate large numbers of pages filled with Japanese text, usually selling counterfeit designer goods. The pages are created on the fly by a spam generator script, added to a sitemap so Google discovers them quickly, and cloaked so the owner browsing the site sees nothing wrong. Your domain’s reputation does the ranking work; the attacker’s store collects the clicks.

Who was exposed: Any compromised WordPress site, especially on shared hosting. Why it mattered: Google maintains a dedicated help page for this hack because of its scale — infected sites can accumulate thousands of auto-generated Japanese spam URLs in the index.

How this attack works

After entry through a vulnerable plugin, weak password or nulled theme, a generator script is planted — often in an uploads or cache folder. It invents URLs (frequently with Japanese characters or random paths), renders a spam product page for each when Googlebot requests it, and lists them in a sitemap file. Because the pages need never exist as posts, deleting ‘spam posts’ from wp-admin finds nothing to delete.

The engine of every cloaked spam attack is conditional serving: the code checks who is asking — Googlebot’s user-agent, a visitor arriving from a Google result, a particular country or device — and only then swaps in the spam. Everyone else, including you checking your own site, receives the genuine page. A second component manufactures discoverability: planted folders, a fake sitemap, or auto-generated URLs, so Google finds and indexes spam pages faster than you can delete them.

Signs your site has it — and how to confirm

  • Google shows Japanese titles and descriptions under your domain that you never published
  • Search Console’s indexed-page count jumps from hundreds to thousands
  • A sitemap on your server lists URLs you never created
  • site:yourdomain.com searches surface folders and paths you do not recognise

Fetch the suspect page as Googlebot and compare it with a normal fetch — if the HTML differs, cloaking is confirmed. Then run the database check for encoded payloads (large unfamiliar options containing base64_decode or eval) and look for planted folders named like your real pages at the server root.

Step-by-step removal and recovery

Immediate actions for this attack

  • Confirm with Search Console’s indexed count and a Googlebot fetch of a spam URL
  • Delete the generator script and planted sitemap — check uploads and cache folders for PHP
  • Audit the database and cron for a reinstall mechanism before declaring it clean
  • Return genuine 404s for spam URLs, submit a fresh sitemap, and request removals in Search Console

The full protocol

  1. Back up the infected site (files and database) and label the backup infected.
  2. Put the site in maintenance mode so Google stops re-crawling live spam while you work.
  3. Delete planted spam folders, fake root files (a hand-made sitemap.xml, rss.xml, feed.xml or robots.txt your plugins did not generate) and any PHP files hiding in wp-content/uploads/.
  4. Reinstall WordPress core, your theme and every plugin from clean official sources; delete anything nulled or unused.
  5. Clean the database: unfamiliar encoded options, hidden spam containers in post content, rogue cron jobs, and any admin user you do not recognise.
  6. Clean .htaccess back to the standard WordPress block and remove rewrite rules pointing at scripts you do not own.
  7. Rotate every credential — hosting (with 2FA), wp-admin, database, FTP — and regenerate the salt keys in wp-config.php.
  8. Verify like Google: fetch key pages as Googlebot, confirm spam URLs return a genuine 404, then work the Search Console cleanup (removals, fresh sitemap, re-indexing requests for your real pages).

How to prevent it

  • Keep plugins, themes and core updated; generators arrive through known flaws
  • Disable PHP execution in wp-content/uploads — a favourite generator hiding place
  • Monitor your indexed-URL count in Search Console; a sudden spike is an early alarm
  • Use unique passwords and 2FA so the login route stays shut

The defences repeat across this whole series for a reason: kept-updated software, unique passwords with 2FA, the fewest possible plugins, backups stored off the server, and monitoring that looks at your site the way an attacker — or Google — does. Sites rarely fall to one exotic trick; they fall to one ordinary gap.

FAQs

Why Japanese? My business has nothing to do with Japan.

The language is incidental — the operators sell counterfeit goods into Japanese search results and need reputable domains to rank. The same tooling runs pharma and casino variants in other languages.

I deleted the spam URLs but they keep coming back in Google.

Google is re-discovering them because the generator is still live, or re-crawling URLs it already knows. Kill the generator first, make the URLs return a real 404, then use Search Console removals.

How long does recovery take?

Spam URLs typically drop over 2–4 weeks once they 404; rankings on your real keywords usually recover over 1–3 months.

Next in the series and the full timeline: WordPress Attacks in the Last 10 Years — the complete guide.

JUNOBIZZ WEBSITE SECURITY
Worried your site is already compromised?

JunoBizz audits, cleans and hardens WordPress sites — cloaked spam, rogue admins, poisoned plugins and everything in this series. Get the checks run before Google finds the problem.

Talk to JunoBizz

© UiCore 2026. All Rights Reserved.