SEO Spam Hack: How to Tell If Strange Pages in Google Belong to Your Hacked Website

Home / Single Post

Recent Blog

Google Business Profile Suspended? Why It Happens and How to Get It Back

If your Google Business Profile is suspended, Google has found something it believes breaks its guidelines. Common causes are keywords in the business name, an ineligible address, or duplicate profiles. Fix the cause first. Then submit one appeal through the official appeals tool with documents showing your business name and address.

Take your digital marketing to the next level with data-driven strategies and innovative solutions. Let’s create something amazing together!

SEO spam hack

How to Tell If Strange Pages in Google Belong to Your Hacked Website

An SEO spam hack happens when attackers quietly add spam pages, links or keywords to your website so they show up in Google under your domain. Common signs include Japanese or pharmacy text in search results, unknown pages in Search Console and sudden traffic drops. Fixing it means removing the infection, closing the entry point and requesting a Google review.

Introduction

You search your business name on Google and something feels off. Under your domain you see listings for discount handbags, online casinos or pages written entirely in Japanese. Your homepage looks perfectly normal when you visit it, so what is going on?

This is one of the most confusing problems a small business owner can face. The site looks fine to you, but Google sees something completely different. Meanwhile your rankings slide, your leads dry up and customers may see warnings before they ever reach you.

In this guide we explain what an SEO spam hack is, how to confirm your site has one, how cleanup works step by step and how to stop it from coming back. We see this issue regularly during website audits, especially on WordPress sites running on shared hosting, so the advice below comes from real recovery work and Google’s own documentation.

What Is an SEO Spam Hack?

An SEO spam hack is a website compromise where an attacker injects content, pages or links meant to manipulate search engines rather than steal data directly. The attacker borrows your domain’s trust and ranking power to promote their own products, usually counterfeit goods, unlicensed pharmacies, gambling sites or adult content.

Unlike ransomware or a defaced homepage, this kind of hack is designed to stay hidden. The longer it goes unnoticed, the more money the attacker makes from your site’s reputation.

Why do hackers target small business websites?

Small business sites are attractive because they often have older plugins, shared hosting and nobody watching security daily. Your domain also has something valuable: age, local trust and backlinks. Attackers don’t care about your business specifically. Automated bots scan millions of sites looking for any known weakness.

What Are the Most Common Types of SEO Spam Hacks?

Most SEO spam falls into a few recognizable patterns. Knowing which one you have helps you find where it is hiding.

Hack TypeWhat You See in GoogleWhere It Usually Hides
Japanese keyword hackPages with Japanese text selling brand name goodsNew random folders, database entries, rogue files
Pharma hackListings for Viagra, Cialis or online pharmaciesDatabase, theme files, injected plugin code
Casino and gambling spamSlot, betting or casino pages under your domainNew pages, hidden links in footer or posts
Gibberish hackPages filled with nonsense keyword stringsAuto generated pages in subfolders
Cloaked keywords and linksSpam shown only to Google, normal site shown to you.htaccess rules, PHP files that check visitor type
Hidden outbound linksNothing obvious in search, but rankings slipFooter, widgets, old posts, database

What is the Japanese keyword hack?

The Japanese keyword hack is one of the most widespread versions. According to Google’s own guide, it creates new pages filled with automatically generated Japanese text inside randomly named folders, and those pages earn money through affiliate links to stores selling fake brand products. Google also notes that attackers often add themselves as an owner in your Search Console account so they can change settings like sitemaps.

What is cloaking in a spam hack?

Cloaking means showing one version of a page to search engines and a different version to human visitors. In a cloaked spam hack, Googlebot sees spam while you see your normal website. This is exactly why so many owners don’t believe their site is hacked at first. The infection is built to hide from them.

How Do You Know If Your Website Has Been Hacked With Spam?

The fastest check is a Google site search. Type site:yourdomain.com into Google and scroll through several pages of results looking for titles, URLs or languages you never created.

Here are the warning signs we look for during audits:

  • Search results under your domain in a foreign language or for products you don’t sell
  • Strange URLs with random letters and numbers, such as folders you never made
  • A sudden spike in indexed pages inside Google Search Console
  • New owners or users in Search Console that you didn’t add
  • Unknown administrator accounts in your WordPress dashboard
  • Visitors from Google landing on spam, while direct visitors see your normal site
  • A “This site may be hacked” label under your listings in Google
  • Browser warnings or an email from your hosting company about malicious files
  • Sudden traffic or ranking drops with no change on your end

How to check your site step by step

  1. Run a site search. Search site:yourdomain.com and add spam words like site:yourdomain.com viagra or site:yourdomain.com casino to surface hidden pages.
  2. Open the Security Issues report in Google Search Console. If Google has detected hacked content, it lists the issue type and sample URLs here.
  3. Check Search Console users and permissions. Remove anyone you don’t recognize, but only after you secure the site, since attackers can re add themselves.
  4. Review the Pages report. A sudden jump in indexed or discovered pages is a strong signal.
  5. Scan the site with an external scanner like Sucuri SiteCheck and check Google’s Safe Browsing site status tool.
  6. Use the URL Inspection tool on a suspicious URL and view the crawled page. This shows what Googlebot actually saw, which exposes cloaking.

Tip: Searching your own site in Google while logged into WordPress can hide the problem. Some infections only show spam to visitors who arrive from a search engine, so test from a private browser window and from search results, not by typing your URL directly.

Why Is an SEO Spam Hack So Harmful for Your Business?

The damage goes far beyond a few ugly search listings. Here is what typically happens if the hack is left alone:

  • Rankings drop because Google sees thin, spammy pages connected to your domain
  • Trust labels appear, such as hacked site warnings in search results, which lower click rates
  • Paid ads can be disapproved if Google flags the landing page domain
  • Email deliverability can suffer when your domain ends up on blocklists
  • Crawl budget gets wasted on thousands of spam URLs instead of your real service pages
  • Customer trust takes a hit when a prospect searches your brand and sees casino listings

In our experience, the business impact often shows up first as a slow decline in calls and form fills, long before the owner realizes the site is compromised.

How Do Websites Get Infected With SEO Spam?

Most infections come through a small number of predictable openings. Understanding the entry point matters, because cleaning the spam without closing the door means it comes back, often within days.

Entry PointWhy It HappensHow Common
Outdated plugins or themesKnown vulnerabilities get exploited by automated botsVery common
Nulled or pirated pluginsCracked premium plugins often ship with backdoors built inCommon
Weak or reused passwordsBrute force or leaked credentials give direct admin accessCommon
Shared hosting cross infectionOne hacked site on an account spreads to others in the same accountCommon on budget hosting
Abandoned admin accountsOld developer or employee logins never removedModerate
Outdated PHP versionOlder server software has unpatched weaknessesModerate

One pattern we see often: a business owner hosts five or six sites on one shared hosting account, one old test site gets hacked, and within weeks every site on that account is serving spam. Separating sites and isolating accounts is one of the most overlooked security steps.

How Do You Clean Up an SEO Spam Hack?

Cleanup has two goals: remove every trace of the infection and close the entry point. Here is the process we follow, in order.

Step 1: Contain the damage

Put the site in maintenance mode if possible, then change every password connected to it. That includes hosting, the WordPress admin, the database, FTP or SFTP accounts and your email for the domain.

Step 2: Take a backup of the infected site

This sounds strange, but a copy of the hacked version helps you or a professional trace how the attacker got in. Store it offline and never restore from it.

Step 3: Find and remove the infected files

Look for:

  • PHP files inside the uploads folder, where they should never exist
  • Unfamiliar files in the root folder with random names
  • Suspicious rules in the .htaccess file that redirect search engine visitors
  • Modified core files, theme files and the main WordPress configuration file
  • Code that is heavily encoded or scrambled, which is a common sign of malware

The safest approach is to reinstall WordPress core files, themes and plugins from clean official sources rather than trying to edit infected copies line by line.

Step 4: Clean the database

Many spam hacks store their pages and links inside the database. Search the posts and options tables for spam keywords, hidden links and scripts. Remove unknown admin users at this stage too.

Step 5: Close the entry point

Update everything, delete unused plugins and themes, replace any nulled software with licensed versions and update your PHP version through your host.

Step 6: Make spam URLs return a 404 or 410 status

Once removed, spam URLs should return a 404 (not found) or 410 (gone) status code. Do not redirect spam URLs to your homepage, and avoid blocking them in robots.txt, because Google needs to recrawl them to see they are gone.

Step 7: Speed up removal from Google

Use the Removals tool in Search Console to temporarily hide the worst spam URLs from results. Submit a clean, updated sitemap so Google focuses on your real pages.

Step 8: Request a review from Google

If the Security Issues report listed problems, fix every one of them across all pages, then select Request Review. Google states that reviews for sites hacked with spam can take up to several weeks. Explain what you found, what you removed and how you closed the entry point.

How Long Does It Take to Recover Rankings After a Spam Hack?

There is no fixed timeline, and anyone promising one is guessing. Recovery depends on how long the hack ran, how many spam pages Google indexed and how quickly the cleanup was completed.

As a general pattern:

  • Spam URLs usually start dropping out of the index within a few weeks once they return 404 or 410
  • The hacked warning clears after Google approves your review
  • Rankings often recover gradually over several weeks to a few months as Google recrawls your genuine pages

Sites cleaned quickly tend to bounce back faster. Sites infected for many months with tens of thousands of spam pages usually need more time and sometimes additional SEO work.

DIY Cleanup vs Professional Help: Which Is Right for You?

FactorDIY CleanupProfessional Cleanup
Best forSmall, recent infections with a clear causeReinfections, cloaking, large spam footprints
Technical skill neededComfort with file managers, databases and codeNone on your side
RiskMissing a backdoor leads to reinfectionLower, if done thoroughly
TimeCan take days for a non technical ownerUsually faster
CostYour time plus any security toolsPaid service, often with follow up monitoring

Our honest opinion: if you have cleaned the site once and the spam came back, stop and bring in a professional. Reinfection almost always means a hidden backdoor or an unclosed entry point that DIY cleanups miss.

What Are the Most Common Mistakes When Fixing a Hacked Site?

  • Only deleting the sample URLs Google shows you, instead of hunting down the full infection
  • Restoring a backup that is already infected, which brings the hack straight back
  • Redirecting spam URLs to the homepage, which confuses Google and can look manipulative
  • Forgetting to remove rogue Search Console owners
  • Changing the WordPress password but not hosting, database or FTP passwords
  • Skipping the review request and waiting for warnings to disappear on their own
  • Assuming a security plugin alone fixes everything, when plugins detect issues but don’t always remove deeply hidden code

How Can You Prevent SEO Spam Hacks in the Future?

Prevention is far cheaper than recovery. These habits close the doors attackers use most:

  1. Keep WordPress core, plugins and themes updated, ideally weekly
  2. Delete plugins and themes you don’t use, even deactivated ones
  3. Never install nulled or pirated plugins
  4. Turn on two factor authentication for every admin account
  5. Use unique, strong passwords stored in a password manager
  6. Limit admin accounts to people who truly need full access
  7. Add a web application firewall, such as those offered by Wordfence, Sucuri or Cloudflare
  8. Keep automatic offsite backups with several restore points
  9. Isolate sites on separate hosting accounts when possible
  10. Check Google Search Console monthly for security issues, new users and spikes in indexed pages

A regular technical review catches most of these warning signs early, often before Google ever flags the site.

Key Takeaways

  • An SEO spam hack injects hidden pages, keywords or links into your site to profit from your domain’s search reputation.
  • The Japanese keyword hack, pharma hack and casino spam are the most common forms.
  • Cloaking often hides the spam from you while Google sees it, so always check with a site search and Search Console.
  • Cleanup requires removing infected files and database entries, closing the entry point and returning 404 or 410 for spam URLs.
  • Google reviews for spam hacked sites can take up to several weeks, and rankings typically recover gradually afterward.
  • Outdated plugins, nulled software, weak passwords and shared hosting are the most common causes.
  • Reinfection after a cleanup is a strong signal to get professional help.

Frequently Asked Questions

Why does Google show Japanese pages for my website?

Your site is most likely affected by the Japanese keyword hack. Attackers create auto generated pages in random folders on your server, filled with Japanese text and links to counterfeit product stores. Check the Security Issues report in Google Search Console and run a site search to see how many pages are affected.

Why can’t I see the spam when I visit my own website?

Many spam hacks use cloaking, which shows spam only to search engine crawlers or to visitors arriving from Google. When you type your URL directly or browse while logged in, the site looks normal. Use the URL Inspection tool in Search Console to see exactly what Googlebot sees on a suspicious page.

Will an SEO spam hack permanently hurt my rankings?

Usually not, if you act quickly and clean the site completely. Once spam URLs return 404 or 410 status codes and Google approves your review, rankings often recover gradually. Longer infections with thousands of indexed spam pages tend to take more time, and some sites need extra SEO work to regain lost ground.

How do I remove hacked pages from Google search results?

First delete the spam pages so they return a 404 or 410 status code. Then use the Removals tool in Google Search Console to temporarily hide the worst URLs while Google recrawls. Submit a clean sitemap and request a review in the Security Issues report if Google flagged your site.

Can a security plugin fix a spam hack on its own?

A security plugin can detect many infections and remove some of them, but it doesn’t always catch deeply hidden backdoors, database injections or rogue Search Console owners. Treat plugins as one tool in the process. A complete cleanup also includes reinstalling clean files, reviewing the database and closing the original entry point.

Should I just restore an old backup?

Only if you are certain the backup was made before the infection began, and even then you must close the vulnerability first. Many hacks sit quietly for weeks before spam appears, so recent backups are often already infected. Restoring without fixing the entry point usually leads to the same hack returning.

How do I know if my site was hacked again after cleanup?

Watch for new unknown pages in a Google site search, rising indexed page counts in Search Console, new admin users or new Search Console owners. Set up uptime and file change monitoring through a security plugin or firewall. Checking Search Console monthly catches most reinfections early.

Does changing hosting companies fix a spam hack?

Not by itself. If you move infected files to a new host, the infection moves with them. A host change can help when the original account was poorly secured or shared with other infected sites, but the files and database must be cleaned first.

Conclusion

An SEO spam hack is frustrating because it hides in plain sight. Your site looks normal, yet Google is showing casino pages, pharmacy listings or Japanese text under your brand name. The good news is that it is fixable. Confirm the problem with a site search and Search Console, clean the files and database, close the door the attacker used and ask Google for a review.

The real win, though, is catching it early or preventing it altogether. Regular updates, strong access controls and a routine technical check go a long way.

If you are seeing strange pages under your domain or your traffic has dropped without explanation, the team at Optimistx Tech Lab is happy to take a look. A quick technical review can show you what Google is really seeing on your site and what to do next. Reach out anytime at +1 (347) 878 0923 or through our contact page.