Japanese keyword hack: spam pages under your domain in Google
Japanese text, pharmacy, casino or fake shoe pages under your domain in Google. How to find them in Search Console and get them out of the results.
If Google shows pages in Japanese, ads for medicines, casinos or branded shoes under your domain, your site was hacked and someone is using it to push their own shops up in search. You often cannot see these pages when you visit the site, because the malicious code shows them only to Google's crawler. To get rid of them you remove the code that creates them, check that the intruder has not added themselves to your Search Console, and then let Google see that those addresses are gone.
Google calls this a hack with keyword spam. The Japanese version is the best known, but the same mechanism works with any language and topic.
How to find it
Type site:yoursite.com into Google and go through a few pages of results. You are looking for titles you did not write and addresses you do not recognise, often with long random strings of characters. Add a word from the spam topic to the query, for example site:yoursite.com viagra or site:yoursite.com casino. With Japanese spam just scroll through the results.
If you have Google Search Console:
- the Security issues report shows "Hacked content" with sample addresses if Google has already detected it,
- the Pages report in the indexing section shows a sudden rise in indexed addresses that you cannot explain,
- in Settings > Users and permissions check for an owner you do not know. Intruders add themselves as owners so they can send Google their own sitemap full of spam.
Open such an address yourself. If you see a normal page or a 404 error while Google shows spam, the code is serving the crawler different content than people. In Search Console the URL inspection tool with the live test shows what Google receives.
What to remove on the server
Before you start, copy the files and the database as they are now.
- Unknown owners in Search Console. Remove them in the settings. Also delete their verification file from the server, usually
googleplus a string of characters ending in.htmlin the root folder, otherwise they can come back. - The .htaccess file. The spam is often generated by a rule that sends non-existent addresses to the intruder's script. Compare
.htaccesswith the standard WordPress block. - Foreign files and folders. Look in the root folder for PHP files with odd names, folders with thousands of HTML files and custom sitemaps (a
sitemapwith foreign addresses). On WordPress also check PHP files inwp-content/uploadsand plugins inwp-content/mu-plugins. - WordPress files. A developer checks core and plugins with
wp core verify-checksumsandwp plugin verify-checksums --alland replaces changed files with official ones. - Accounts, passwords, updates. Delete unknown administrators, change the passwords for the dashboard, hosting, FTP and the database, update everything and remove plugins you do not use.
The detailed WordPress cleanup order is in WordPress site hacked: how to fix it, step by step.
How to remove the spam from Google results
After cleanup the spam addresses should return a 404 or 410 error. Google then drops them from the results on its next visits. Do not redirect them to the home page, because Google may keep them in the index.
If the Security issues report has an entry, request a review there after cleanup and describe what you did. Google says a review for spam takes the longest, sometimes several weeks. How to word the request is explained in Google says your site is dangerous.
The Removals tool in Search Console hides chosen addresses from the results for about six months. It helps with the few most visible pages, but it does not replace cleanup: if an address still works, it will come back.
What cannot be sped up
Even after a thorough cleanup, spam titles disappear from the results gradually, as Google visits each address. With thousands of pages this can take weeks. During that time repeat site:yoursite.com every few days and check whether the number of spam results is falling. If it is rising, the code is still running.
Spam in the results also affects the business itself: Google may lower the site's rankings, and customers who see Japanese titles under your name may decide the site is fake.
Common questions
Why can't I see these pages on my site?
Because the malicious code checks who is asking. It shows spam to Google's crawler and a normal page or an error to people. That is why the owner often notices nothing for a long time.
Is it enough to submit the addresses for removal in Search Console?
No. The tool hides results temporarily. If the code on the server keeps creating pages, they will return.
Does this only affect WordPress?
No. This type of hack happens on any system, but WordPress is the most popular, so it is the one you hear about most.
If you would rather not do it yourself
The free website check works from the outside, with no password, and shows among other things whether the domain is on threat lists and whether files anyone can open are lying on the server. Spam that only Google sees may not be visible to an outside scan, so start with site: and Search Console as well.
If you want someone to remove the spam and its source, order a hacked site fix. From $99. We reply within 1 business day with the scope and the price, and you pay only after you accept. The free Ensomedia Security plugin then helps watch files and accounts on WordPress.