Site flagged as dangerous by Google: what to do about the warning
When Google or your browser warns that your website is dangerous, the path is: confirm the problem in Google Search Console, keep a copy of the site, remove what was injected, close the vulnerability that allowed the break-in, and only then request a review from Google. Requesting a review before the site is clean usually leads to a rejection and delays the removal of the warning.
This article explains each step. Google’s menu names may change over time, so always check the current Search Console help.
How the warning appears
The most common warnings are:
- Red blocking screen in the browser, with messages such as “Deceptive site ahead,” “The site ahead contains malware” or “This site may harm your computer,” shown before the page opens.
- “This site may have been hacked” or “This site may harm your computer” warnings in Google results.
- Email or message from Search Console reporting security issues on the site.
- Sudden drop in visits from Google with no other explanation.
- Warning from your hosting provider or an antivirus saying there are suspicious files in the account.
The block comes from lists of dangerous sites maintained by companies such as Google (Safe Browsing). Browsers check these lists, so the warning can appear in more than one browser at the same time.
What the warning means
Google usually flags one of these types of problems:
| Type | What it means |
|---|---|
| Malware | The site distributes or tries to install malicious software on visitors |
| Deceptive content (phishing) | Pages that imitate another site to steal passwords or data |
| Code or content injection | Someone inserted code, text or links into your site without you knowing |
| URL injection | New pages were created on your domain, often with spam |
| Unwanted software | The site leads to downloads that change the visitor’s computer |
A warning is almost never a mistake. Even if the site looks normal when you open it, the malicious code may only appear to visitors who arrive from Google, to people on phones or to people who are not logged in.
What to do, step by step
1. Don’t ignore it and don’t delete anything
- Avoid opening the site several times in an unprotected browser. To check things, use Search Console instead of the page itself.
- Don’t delete files blindly. You could lose the trail of the break-in or take the site down.
- Download a copy of the files and export the database, even if they are infected. It serves as evidence for investigating how the attacker got in.
- If the site is redirecting visitors or stealing data, consider putting it into maintenance mode while you clean it.
2. Confirm the problem in Google Search Console
- Go to Google Search Console and add the site, if it isn’t registered yet. You need to prove you own it, for example with a DNS record or an HTML tag.
- In the menu, open Security & Manual Actions and then Security issues.
- Read the type of problem, the date it was detected and the sample of affected pages. This data tells you what to look for.
- Also check Manual actions in the same section: if there is spam, Google may have applied a manual action, which has its own review process.
If the report shows no problem but the browser still shows the warning, the block may come from another safety list or from an antivirus. In that case, confirm the exact address shown in the warning and contact your hosting support.
3. Clean up the site
Cleanup depends on what was found, but the routine usually looks like this:
- Change the passwords for WordPress, cPanel, FTP and the database (and update
wp-config.php). See site passwords and access. - Look for administrator users you didn’t create and remove them.
- Compare the files of the WordPress core, themes and plugins against the originals, reinstalling them at the same version. Look for
.phpfiles insidewp-content/uploads, changes in.htaccessand files with strange names. - Clean up the database: look for code snippets inserted into posts, site options and widgets.
- Remove abandoned plugins and themes, or any you don’t use.
- Restore a clean backup, if you have one dated before the break-in (JetBackup keeps restore points). Even so, you still need to close the vulnerability, or the break-in will happen again.
For a more detailed guide, see how to use AI to remove viruses from a WordPress site. When the case goes beyond what you can do on your own, our virus and malware removal for hacked sites service is the right fit.
4. Close the vulnerability
Cleaning up without finding out how the attacker got in often ends in reinfection. The most common causes are outdated plugins or themes, weak or leaked passwords, old users who were never removed, and pirated themes or plugins. Update WordPress, your themes and your plugins, remove what you don’t use, and enable two-factor authentication.
5. Check the cleanup before requesting a review
- Open the site in a private window and on a phone using mobile data, searching for the site’s name on Google and clicking the result.
- In Search Console, use URL Inspection to see how Google sees the page.
- Check whether the spam pages are gone, whether there are no strange redirects, and whether the security report points to the same pages.
6. Request a review from Google
- In the Security issues report, check the box confirming you have fixed the problems and click Request Review.
- Describe what was found, what you did to clean it and how you closed the vulnerability. Be objective and truthful.
- Submit the request and follow the response in Search Console and in your email.
The timing is up to Google and varies. Search Console help says a review can take anywhere from a few days to a few weeks. If the request is rejected, the report shows what was still found: fix it and request again, without resubmitting before the issue is resolved.
When Google approves, the warning in results goes away. Browser warnings use the same database, but the update may take a while to reach everyone.
When to call a professional
- the warning came back after a cleanup;
- Google rejected the review request more than once;
- the site is a store, takes payments or stores customer data;
- there is no backup from before the break-in;
- you don’t know how the break-in happened;
- the site is offline and every day it stays down costs sales.
MigraCloud handles cleanup and investigation: see the virus and malware removal from hacked sites page or get in touch with us.
cPGuard and server protection
MigraCloud includes cPGuard, a security solution for cPanel servers that combines a firewall with file scanning for malicious code. It works in three ways:
- Automatic cleaning: when it finds malicious code in a file, it tries to remove it.
- Automatic quarantine: suspicious files are isolated so they stop running on the site.
- Detection alerts by email: notifications about what was found, also sent to you, so the problem gets attention quickly.
This reduces the risk and the damage of a break-in, but it doesn’t replace the site’s own care: an outdated plugin or a leaked password are still ways in. A file placed in quarantine may also have been part of the site, such as a plugin or theme, so if something stops working after an alert, contact support before reinstalling anything. If you received a Google warning, follow the steps above even if the server didn’t send any alert.
How to prevent it from happening again
- Update WordPress, your themes and your plugins.
- Use strong, unique passwords, and review access regularly.
- Enable two-factor authentication.
- Keep backups in a location separate from the server and test restoring them. MigraCloud runs automatic backups with JetBackup, and you restore them yourself: see how to use JetBackup in cPanel.
- Register your site in Search Console and turn on email alerts, so you learn about problems before your visitors do.
Frequently asked questions
Why did Google flag my site as dangerous?
Because it detected something that signals a risk to visitors: malware, pages that imitate another site to steal data, injected code or spam links. The Security issues report in Search Console shows the type of problem and the affected pages.
The warning appears even though the site looks normal. Could it be a mistake?
It’s rare. Malicious code often shows up only to people who arrive from Google, on phones or while not logged in, which is why the owner doesn’t see it. Before assuming it’s a mistake, check Search Console and look for signs of a break-in.
How long does Google take to remove the warning?
It depends on Google. Search Console help says a review can take a few days to a few weeks. The warning only goes away after the site is clean and the review is approved.
Can I request a review before cleaning the site?
It won’t help. Google checks the site again, and if the problem is still there the request is rejected, which delays the process. Clean up, close the vulnerability, check everything and only then request a review.
Do I need Search Console to fix this?
In practice, yes. That’s where you see the type of problem, the affected pages and where you request the review. Register the site and prove you own it. Registration is free.
Does the browser warning go away when Google approves the review?
Usually, because browsers check the same list of dangerous sites. It may take a while for the update to reach all visitors.
The server has protection. Why was the site flagged anyway?
Because server protection such as cPGuard, with automatic cleaning and quarantine, doesn’t stop every form of break-in. A vulnerability in a plugin, a leaked password or a forgotten user can open the door through legitimate means, and Google evaluates what visitors receive, not what the server saw. Follow the steps in this article and, if you need help, get in touch with us.
Will changing hosting or domain solve it?
No. The problem is in the files and the database, and they go with you when you move. Changing addresses without cleaning up only carries the infection to the new location.