Few things worry a business owner like searching for their own company and seeing “This site may be hacked” under the listing. Or worse, visitors hitting a full red screen in Chrome warning them that your site is dangerous. Traffic drops sharply, customers lose trust and enquiries dry up.
I’ve helped many sites recover from these warnings. The good news is that they’re removable. Google wants to lift them once a site is genuinely clean. The bad news is that requesting a review before the cleanup is complete usually leads to rejection and longer delays.
This guide walks through the full process: understanding which warning you have, cleaning properly, requesting a review and recovering your search presence.
Understand which warning you have
Google uses a few different warnings, and each comes from a different system.
“This site may be hacked”
This appears as a small label under your listing in search results. It usually means Google detected that someone added spam content, such as hidden links, cloaked pages or keyword-stuffed spam, often for their own SEO benefit. Clicking your listing may show an interstitial warning before visitors reach the site.
Safe Browsing warnings
These are the full-screen red warnings in Chrome and other browsers, often saying “Dangerous site” or “Deceptive site ahead”. They’re triggered when Google’s Safe Browsing system detects malware, phishing pages or unwanted software on your site. They affect anyone using a browser that relies on Safe Browsing, not just Google searchers.
Manual actions
Sometimes a human reviewer at Google applies a manual action for spam, including hacked content. These appear in the Manual Actions report in Search Console.
You need to know which one you’re dealing with, because each is reviewed through Search Console, and you’ll need to address the specific issue Google found.
Step 1: Verify your site in Search Console
If you haven’t already, verify ownership of your site in Google Search Console. The domain property, verified through DNS, covers all subdomains and protocols, which is useful because hacks sometimes affect subdomains too.
While you’re there, check Settings, then Users and permissions. Attackers sometimes add themselves as verified owners so they can submit spam sitemaps and request indexing. Remove any user you don’t recognise, and remove their verification method too, such as an unfamiliar HTML file or meta tag, or they can simply re-verify.
Step 2: Read the Security Issues report
Open the Security Issues report. It lists the type of problem Google found, such as hacked content: code injection, URL injection, content injection, or malware and deceptive pages. It often includes sample URLs.
Those sample URLs are clues, not a complete list. If Google shows three spam pages, there may be thousands. Use them to understand the type of infection, then look for the full extent.
Step 3: Find the full extent of the infection
Search your indexed pages
Search Google for site:yourdomain.com and look for pages you didn’t create. Try combinations with common spam terms. Note the URL patterns; spam pages often share a structure, like a particular folder or file extension.
Check for cloaking
Many hacks show spam only to search engine crawlers, while normal visitors see your regular site. Use the URL Inspection tool in Search Console to fetch a page as Googlebot and view the rendered HTML. If it differs from what you see in your browser, the site is cloaking.
You can also test from the command line by sending a Googlebot user agent:
| <code>curl -A "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" https://example.com/ | less</code> |
|---|
Compare that output with a normal request. Remember that some malware checks Google’s IP addresses rather than the user agent, so URL Inspection is the more reliable test.
Look on the server
Check for:
- Recently modified files, and PHP files in the uploads folder.
- Unknown files in the site root, especially sitemaps or files with random names.
- Altered .htaccess files that redirect search engine traffic.
- Modified index.php or wp-config.php files.
- Core and plugin files that fail checksum verification.
Check the database
Spam can be stored as posts, options or injected into existing content. Search for script tags, iframes and spam keywords:
Also look for posts of unusual post types or authored by unknown users.
Step 4: Clean the site completely
A partial cleanup is the most common reason review requests fail. Be thorough.
- Back up the infected site first, for evidence and in case you need to recover something.
- Replace WordPress core with a fresh copy from WordPress.org.
- Reinstall every plugin and theme from official sources, rather than trusting existing files. Remove anything you don’t use.
- Remove malicious files from uploads and other folders.
- Clean the database: delete spam posts, remove injected scripts, clean malicious options and remove rogue users.
- Restore clean .htaccess and server config files.
- Check cron jobs, both WordPress cron events and system crontabs, for tasks that recreate malware.
- Change every password and key: hosting, SFTP, database, WordPress users and the salts in wp-config.php.
Restoring from a backup can be quicker, but only if you’re sure the backup predates the infection. Hacks often sit unnoticed for weeks, so older backups may already be compromised.
Step 5: Close the entry point
Before requesting a review, find out how the attacker got in and fix it. Check access logs around the time the first malicious file appeared. Common causes include an outdated plugin with a known vulnerability, a weak administrator password or a compromised hosting account.
If you don’t fix the entry point, the site may be reinfected while Google is reviewing it. That leads to a failed review and a longer process.
Step 6: Deal with the spam URLs
Once spam pages are deleted, they should return a 404 or 410 status. A 410 tells search engines the content is permanently gone, which can help them drop it faster. You can serve 410s for spam URL patterns at the server level. On Nginx:
| <code>location ~* ^/(cheap | replica)-.*.html$ { |
|---|
Adjust the pattern to match your spam URLs, and be careful not to catch legitimate pages.
For particularly visible spam URLs, you can use the Removals tool in Search Console to hide them temporarily from search results while Google recrawls. Don’t use it as a substitute for actually removing the content.
Also check your sitemap. Make sure it only lists your real content and resubmit it, so Google recrawls your legitimate pages.
Step 7: Request a review
When you’re confident the site is clean:
- Go to the Security Issues report and select “I have fixed these issues”.
- Click Request Review.
- Explain what you did. Describe the type of hack, what you removed, how the attacker got in and what you’ve done to prevent it happening again.
Be specific. A clear, honest explanation helps reviewers. “We removed malware” is weak. “We found injected spam pages created through a vulnerable form plugin, removed 4,200 spam URLs, reinstalled all core and plugin files, removed two rogue admin accounts, updated the vulnerable plugin and enabled two-factor authentication” is much better.
If you had a manual action, request reconsideration through the Manual Actions report in the same way.
How long does a review take?
Safe Browsing reviews for malware are often processed within a few days. Hacked spam reviews can take longer, sometimes a couple of weeks. You’ll receive a message in Search Console with the outcome.
If the review is rejected, Google usually indicates what’s still wrong. Go back, find what you missed and try again. Don’t keep resubmitting without making real changes.
Recovering traffic afterwards
Once the warning is removed, traffic usually recovers, but not always instantly. Google needs to recrawl your real pages and drop the spam ones. To help:
- Submit your clean sitemap.
- Use URL Inspection to request indexing for your most important pages.
- Monitor the Pages report for spam URLs returning 404 or 410.
- Watch the Performance report for spam keywords disappearing.
If the hack lasted a long time and created many spam pages, full recovery can take weeks.
Prevent it from happening again
Being hacked once makes you a known target. Attackers sometimes return to see if the door is still open. After recovery:
- Keep everything updated.
- Use two-factor authentication on all admin accounts.
- Block PHP execution in uploads.
- Use a firewall.
- Set up file integrity monitoring and uptime alerts.
- Keep off-site backups with enough history to go back before an infection.
- Check Search Console regularly for security warnings and unknown users.
Frequently asked questions
Can I remove the warning without cleaning the site?
No. Google rechecks the site during review. If malicious or spam content is still present, the request will be rejected, and repeated failed requests can slow down future reviews.
Will the hack permanently damage my rankings?
Usually not, if you clean it properly and quickly. Rankings typically return once Google recrawls the clean site. Long-running hacks with large amounts of spam can take longer to recover from.
Do other search engines show warnings too?
Bing has its own warnings and webmaster tools. If you see warnings there, use Bing Webmaster Tools to review security issues and request a recheck after cleaning.
Should I hire someone to clean the site?
If you’re not comfortable working with files, databases and logs, yes. Incomplete cleanups lead to rejected reviews and reinfection. An experienced professional can usually find hidden backdoors and the entry point much faster.
Final thoughts
A Google hacked warning is alarming, but it’s a problem with a clear solution. Find the full extent of the infection, clean it completely, close the door the attacker used and then request a review with a clear explanation. Rushing the review is the most common mistake. Take the time to do the cleanup properly, and the warning, along with your traffic, will come back under control.




