Why Google downgrades hacked sites, and how to prevent it

A hacked site loses search traffic in three ways, each run by a different part of Google: its pages are demoted or dropped as spam, its results carry a warning, and a reviewer can put the whole property under a manual action. This guide covers what triggers each one, how to notice before your visitors do, how long the way back takes, and the regular scanning that keeps you out of it.

By , founder of Porteur · Updated 16 November 2026 · Markdown

Hacked content is spam in Google's rules

Google's spam policies list hacked content beside cloaking and link spam. The definition is short: "any content placed on a site without permission, due to vulnerabilities in a site's security". The policy does not ask who wrote the content. You are the victim, and your pages are still the spam.

The consequence is the one every spam policy carries: sites that violate them "may rank lower in results or not appear in results at all". Google's reasoning is the searcher's. A result that sends someone to a fake pharmacy or a malware download is a bad result, whoever owns the domain.

The policy names four forms. Each one looks different to you and to a crawler.

FormWhat the attacker doesWhat Google finds
Code injectionAdds a malicious script to pages that already existPages that load malware or send visitors elsewhere
Page injectionCreates new pages on your domain, often by the thousandSpam URLs indexed under your name, beside your real pages
Content injectionHides links or text in existing pages, or shows them to crawlers onlyHidden text and cloaking, two more spam policies broken at once
RedirectsSends some visitors to another site, by referrer, device or user agentA page that answers Googlebot one way and a searcher another

Three downgrades, run by three systems

What people call a penalty is three separate things. They start at different times and end in different ways, so it helps to know which one you are looking at.

  1. Demotion and removal

    Google's spam systems lower or drop the pages that carry hacked content. No message is sent. You see it as clicks falling in the Performance report while injected pages collect impressions for searches you never aimed at.

  2. Warnings in the results and in the browser

    Search Console's help says pages or sites affected by a security issue "can appear with a warning label in search results or an interstitial warning page in the browser". The browser warning comes from Safe Browsing, whose lists Chrome, Firefox and Safari all read. It stops visitors from every channel, including the people who type your address.

  3. A manual action

    A human reviewer confirms the spam and files an action against the pages or the whole site. It appears in the Manual actions report and stays until you fix the cause and a reviewer accepts your request.

How to notice before your visitors do

Attackers hide from the owner. Injected pages are often shown to Googlebot only, or to visitors who arrive from a results page, so the site looks normal when you type its address. These checks see past that.

  • Search site:yourproduct.com and read past the first page. Titles in a language you do not publish in, or words like casino, loans and pills, are injected pages.
  • Open the Performance report in Search Console and sort the queries by impressions. Searches that have nothing to do with your product mean Google has indexed content you did not write.
  • Watch the count of indexed pages in the Pages report. A site of sixty pages that shows nine hundred has grown without you.
  • Run the live test in the URL Inspection tool on your home page, and compare the HTML Google receives with what your browser shows.
  • Click one of your own results from Google on a phone. A redirect that fires for search visitors only shows up here and nowhere else.
  • Open Settings, then Users and permissions, in Search Console. An owner you do not recognise was added by someone who can write files to your site.
  • Read the Security issues and Manual actions reports. Both should say that no issues were detected.

The cause is a hole Google never names

Google reports the symptom. It does not test your site for weaknesses, and it will not tell you how the content arrived. Content placed without permission needs a way in, and until that way is closed the spam returns after every clean-up.

On a site built on a CMS, the usual ways in are an outdated plugin or a reused admin password. On a product built with an AI app builder or a modern framework there is no plugin to update. The holes sit in your own configuration:

  • A database table that anyone holding the public key can write to. If that table feeds your pages, a stranger can publish on your domain.
  • An API route that changes data without checking the session.
  • A secret key shipped in the JavaScript bundle, or an exposed .env file or .git folder.
  • A storage bucket that accepts uploads from anyone and serves them from your domain.
  • An admin page protected only by the fact that nobody knows its address.

None of these shows in a review of the feature you just shipped, and none changes how the site looks. They show when someone attacks the live app from outside. Keybrum does that on purpose: it attacks your deployed app the way a stranger would and hands you the proof of what leaked, before the same request is sent by someone who means it.

The way back, and how long it takes

  1. Close the hole first

    Find how the content arrived and shut that door before you delete anything. Rotate every key and password that was exposed. Keybrum's guide to what to do when your app is hacked gives the order for the first hour, the first day and the first week.

  2. Remove everything that was added

    Pages, database rows, files, scripts in templates, user accounts, sitemaps you did not submit, and Search Console owners you did not add.

  3. Answer 404 or 410 on the spam URLs

    Do not redirect them to the home page. Google reads a mass redirect to the home page as a soft 404 and keeps the URLs on its list for longer.

  4. Request a review

    In the Security issues report, or the Manual actions report if an action was filed, describe what was wrong and what you changed. Google's help says a review "can take from a few days to a few weeks to complete", and asks you not to send a second request while the first is open.

  5. Wait for the recrawl

    A lifted warning does not restore rankings in one step. Google has to crawl the clean pages again and let the spam URLs fall out of the index, and that runs on Google's schedule.

Count the cost in weeks of search traffic, plus every visitor who met a red warning page with your name on it. The scan that would have found the hole takes minutes.

Prevention is a schedule of scans

Between the day a hole opens and the day someone uses it there is a gap. Regular scanning is how you find the hole inside that gap. One scan before launch is a start. New holes arrive with new releases, so the scan has to repeat.

  1. Look at what a stranger already sees

    Paste your address into the free check at keybrum.com/check. In about ten seconds it shows what any visitor's browser already downloads: your stack, your backend, the keys and table names in your code, and the attacks that apply. No account is needed and nothing is sent to your backend.

  2. Attack the live app

    The full run sends 338 attacks at the deployed app: database tables, storage, API routes, sign-in, leaked keys, exposed files. Each finding comes with the request and the response that prove it, and a fix written for your coding agent. Keybrum only attacks an app whose owner has proved ownership.

  3. Retest until the attack fails

    A finding closes only when the same attack is sent again and fails. That is proof the hole is shut, which a clean-looking page is not.

  4. Repeat on every deploy

    Deploy hooks for Vercel, Netlify and GitHub, a CI check and scheduled runs attack again each time the app changes. You hear about a new exposure the day it ships.

  5. Keep the plain defences

    Two-step verification on your registrar, host, repository and Google account. Dependencies kept up to date. Keys with the least access that works. A Content-Security-Policy header, so an injected script has nowhere to load from.

The check is free. The attack is paid: a one-time report is €49, and plans start at €29 a month.

What to check, and how often

CheckHow oftenWhere
Security issues and Manual actions reportsWeeklySearch Console
Queries and indexed pages you did not expectWeeklySearch Console, Performance and Pages
A site: search read past page oneMonthlyGoogle
Owners and users on the propertyEvery quarterSearch Console settings
An attack run on the live appOn every deploy, and on a scheduleKeybrum
Dependency and platform updatesAs they are releasedYour repository and your host

The first four rows tell you that Google has seen something. The last two keep it from having anything to see.

Questions

Sources

Check my site, free

Paste your URL and the free check reads your site, the searches around it and the rivals on them in about thirty seconds, and shows three findings whole: a baseline to hold your traffic against if it ever moves.

  • Free check, no card
  • Read-only, your own accounts
  • Readable by your agent

Read next