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 Théophile Louvart, 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.
| Form | What the attacker does | What Google finds |
|---|---|---|
| Code injection | Adds a malicious script to pages that already exist | Pages that load malware or send visitors elsewhere |
| Page injection | Creates new pages on your domain, often by the thousand | Spam URLs indexed under your name, beside your real pages |
| Content injection | Hides links or text in existing pages, or shows them to crawlers only | Hidden text and cloaking, two more spam policies broken at once |
| Redirects | Sends some visitors to another site, by referrer, device or user agent | A 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.
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.
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.
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.comand 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
.envfile or.gitfolder. - 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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
| Check | How often | Where |
|---|---|---|
| Security issues and Manual actions reports | Weekly | Search Console |
| Queries and indexed pages you did not expect | Weekly | Search Console, Performance and Pages |
A site: search read past page one | Monthly | |
| Owners and users on the property | Every quarter | Search Console settings |
| An attack run on the live app | On every deploy, and on a schedule | Keybrum |
| Dependency and platform updates | As they are released | Your 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
No. Google does not test sites for weaknesses. It acts on what the weakness led to: injected pages, hidden links, redirects or malware. A vulnerable site ranks normally until the day someone uses the hole, which is why you have to find it yourself.
Google's help says a review can take from a few days to a few weeks. After the warning is lifted, rankings return as Google recrawls the clean pages and the spam URLs drop out of the index, which adds more time on a site that is crawled slowly.
Demotion can be page by page, while browser warnings and manual actions often cover the whole site. Google also asks you to fix the issue everywhere before a review: cleaning some pages does not bring part of the site back.
Search Console sends a message and lists the problem in the Security issues report, with sample URLs. A manual action appears in the Manual actions report. If the site is not verified in Search Console, you find out from the warning in the results.
No. Let them answer 404 or 410. A redirect to the home page is read as a soft 404, and the spam URLs stay on Google's list longer than if they had simply gone.
Once before launch, then every time the app changes. Most holes arrive with a release: a new table, a new route, a new key. A scan tied to each deploy and a scheduled one for the quiet weeks cover both.
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
- GuideWeb security and SEO: why a hacked site loses rankings
- GuideSecurity headers that improve both SEO and trust
- GuideManual actions and the reconsideration request
- GuideGoogle spam updates: the policies they enforce and how to stay clear
- GuideHow to use the URL Inspection tool in Search Console
- GuideYour organic traffic dropped: how to find the cause by date
- GuideRun a security audit before your launch, not after the breach
- GlossaryScaled content abuse