The Japanese keyword hack fills your site with auto-generated Japanese pages that sell fake brand goods, and Google indexes them under your domain. To fix it: back up the site, reinstall clean core, theme and plugin files, delete the files and database entries that create the spam, remove any stranger from Google Search Console, then return a 404 or 410 for the spam URLs so Google drops them. Finally, close the hole the attacker used, or they will be back.
I’m Sukesh Das. I have built and repaired more than 1,200 websites since 2018, and the Japanese keyword hack is the infection I clean most often. One job was 191 hacked WordPress sites in 14 days, another was a school with 76,700 spam pages in Google. This is the process I use.
Japanese keyword hack cleanup at a glance
| Step | What you do | Why it matters |
|---|---|---|
| 1. Confirm | Search site:yourdomain.com and check Search Console | Shows how many spam pages exist |
| 2. Back up | Copy files and database | You can recover if something breaks |
| 3. Take back Search Console | Remove unknown owners and their verification files | Attackers use it to push spam sitemaps |
| 4. Clean files | Reinstall core, theme and plugins; delete unknown PHP | Removes the spam generator |
| 5. Clean database | Remove spam posts, options and rogue admins | Stops the spam coming back from the database |
| 6. Fix .htaccess | Replace it with a clean default | Hacks hide redirects and cloaking here |
| 7. Clear Google | Spam URLs return 404 or 410, request recrawl | Google drops the pages from search |
| 8. Harden | Update, change passwords, add a firewall | Stops reinfection |
What is the Japanese keyword hack?
It is a spam attack, mostly on WordPress, where malware generates thousands of pages full of Japanese text and affiliate links to fake designer goods. Google’s own guide, Fix the Japanese keyword hack, explains that the pages usually sit in random folder names and are designed to rank in search.
The nasty part is cloaking. The spam is shown to Google but hidden from normal visitors, so the owner opens their site, sees nothing wrong and assumes it is fine, while Google shows a fake Japanese shop for their brand name.
How do I know if my site has the Japanese keyword hack?
- Search Google for
site:yourdomain.com. Japanese titles or thousands of pages you never made are the giveaway. - Open Google Search Console and look at Security Issues, Pages and Sitemaps. A sitemap you did not add is a red flag.
- Check Settings, Users and permissions in Search Console. An owner you do not recognise means the attacker verified themselves.
- Use the URL Inspection tool on a spam URL. It shows what Google sees, even when the page looks normal to you.
How do I remove the Japanese keyword hack from WordPress?
Back up first
Take a full copy of the files and database before touching anything. Infected backups are still useful, because they let you compare and recover content.
Replace every file you can
Reinstall WordPress core from wordpress.org, then reinstall each theme and plugin from a fresh download. Do not try to clean these files line by line. Anything left over that is not part of WordPress, your theme or your plugins (for example a random PHP file in uploads, or a strangely named folder in the root) should be looked at and usually removed. Sorting files by modified date helps you find what the attacker added.
Check .htaccess and wp-config.php
Attackers love rewrite rules that send search engines to the spam generator. Compare your .htaccess with the default WordPress rules and remove anything else you cannot explain. Check wp-config.php for added code at the top or bottom.
Clean the database and users
Look for administrator accounts you did not create, spam posts or pages, and suspicious entries in the options table. Delete unknown admins, then reset every password and the security keys in wp-config.php so old logins stop working.
How do I take back Google Search Console?
In Search Console, go to Settings, then Users and permissions, and remove any owner you do not know. Their access stays alive while their verification token exists, so also delete their verification HTML file from your site, or the rewrite rule that fakes one. Then remove any sitemaps they submitted.
How do I get the spam pages out of Google?
- Make sure every spam URL now returns a 404 or 410 status, not a redirect to your homepage. A 410 tells Google the page is gone for good.
- Submit your real sitemap again so Google recrawls the site.
- Use the Removals tool in Search Console for urgent patterns, such as a whole spam folder. It hides results temporarily while Google recrawls.
- Be patient. With thousands of pages, Google can take weeks to drop them all. Track the count with the site search and the Pages report.
How do I stop it coming back?
Reinfection within days is common when the original hole stays open. Update everything, remove plugins and themes you do not use, never run nulled (pirated) plugins, turn off file editing in the dashboard, use strong unique passwords with two-factor login, and add a firewall such as Wordfence. My WordPress security checklist covers the full list, and if the hack is happening right now, start with what to do in the first hour.
Japanese keyword hack FAQs
Why can’t I see the Japanese pages on my site?
The hack uses cloaking. It shows spam to search engine bots and the normal site to visitors. Use URL Inspection in Search Console to see what Google sees.
Will a security plugin remove the Japanese keyword hack?
It can find many infected files, but it rarely clears the database spam, the Search Console takeover and the pages already in Google. A full cleanup needs all of those steps.
How long until the spam disappears from Google?
Small sites can clear in a few weeks. Sites with tens of thousands of spam pages can take longer. Returning 410 for the spam URLs and resubmitting your sitemap speeds it up.
Should I redirect the spam URLs to my homepage?
No. Redirects keep the URLs alive in Google’s eyes. Let them return 404 or 410 so Google removes them.
Can the Japanese keyword hack affect sites that are not WordPress?
Yes. Any site that runs PHP and has a weak point can be hit, but WordPress sites with outdated plugins are the most common target.
Want it cleaned for you?
I clean the files and database, take back Search Console, get the spam out of Google and harden the site so it stays clean. See my WordPress malware removal service or send me your site for a free check.

