There is a particular kind of phone call every website owner dreads. A customer, a relative or a friend says, “I clicked your website link and it opened some casino page.” Or a gambling site. Or a fake prize page. You open the site yourself on your laptop and it looks perfectly normal. You think they made a mistake. They did not.
A WordPress site redirecting to spam is one of the most common hacks on small business websites in India, and also one of the most confusing, because it often hides from the owner. It may only redirect visitors on mobile, only visitors coming from Google, or only people who are not logged in. Meanwhile, Google may start showing a red warning, your customers stop trusting you, and your search traffic drops.
This guide is written for the owner, not for a developer. I will show you how to confirm a WordPress hacked redirect, what to do in the first hour to contain the damage, where the infection usually hides, your three choices to clean hacked WordPress site files, how to remove the hacked website Google warning using the Security Issues report in Search Console, how to check your search results after the clean-up, and a simple prevention routine. Everything here is defensive: detect, contain, clean, recover and prevent.
It was a Friday evening and I was standing at the sugarcane juice stall near the Palakollu market, waiting for my glass, when my phone rang. A dentist I had met at a small business event, who runs a clinic in a nearby town, sounded embarrassed more than worried.
A patient had told him that morning that his clinic’s website, the one printed on his visiting cards, had opened a betting page on her phone. He had checked on his office computer and seen only his normal homepage with his photo and timings. His receptionist checked on her phone and saw the betting page. Now he was sure someone was playing a joke.
I finished my juice, sat on the stall’s bench and opened his site on my phone from a Google search. Two seconds of his homepage, then a flash, then a page full of cricket betting odds. On my laptop at home, logged out, the same thing. Logged in as admin, nothing. That pattern is the signature of a WordPress hacked redirect, and the rest of this article is what we did over the next few days.
Before you panic or start deleting things, confirm that you really have a WordPress site redirecting to spam. These hacks are designed to hide from the site owner, so you have to test like a visitor.
Attackers know that if the owner sees the redirect, they will fix it quickly. So a WordPress hacked redirect often only triggers when:
That is why the dentist saw nothing on his office computer, where he was logged in and typed the address directly.
If any of these tests send you to a gambling, adult, pharmacy, fake prize or unknown page, you have a WordPress site redirecting to spam.
| Test | What it catches |
|---|---|
| Logged out, private window | Redirects hidden from logged-in admins |
| Mobile data on a phone | Mobile-only redirects |
| Clicking from Google search | Redirects that target search visitors |
| Several pages | Redirects added only to some pages |
| Another person, another network | Redirects that fire only once per visitor |
Once you confirm a WordPress site redirecting to spam, the first hour matters. The goal is not to fix everything. The goal is to stop the damage from getting worse and to protect your evidence and backups.
The worst thing you can do is start deleting random files and plugins. You may delete the clues a cleaner needs, break the site completely, or delete your only good backup.
Yes, even though it is infected. Ask your hosting company or use your hosting panel to back up all files and the database. This copy helps a professional find what changed, and protects you if a clean-up goes wrong. Label it clearly as “infected backup”.
Find out from your host or your backup plugin which backups exist and their dates. If you know roughly when the problem started, a backup from before that date may be clean. Do not restore it yet. Just note it.
The attacker may still have access. Change passwords in the order explained in the next section.
Tell them your site is redirecting visitors to spam and ask:
Most Indian hosting companies have a support ticket or chat. A written ticket is better than a call, because you keep a record.
If the redirect is sending your customers to harmful pages, consider putting the site in maintenance mode or asking your host to temporarily block public access, so visitors are not harmed while you clean. Make this decision with your host or developer, because it affects your search traffic.
If staff or a developer have access to the site, tell them immediately so nobody logs in from an infected computer or reuses old passwords.
| First-hour step | Why |
|---|---|
| Do not delete things | Keeps clues and avoids breaking the site |
| Backup current state | Evidence and a safety net |
| Find older clean backup | A possible quick recovery path |
| Change passwords | Locks out the attacker |
| Hosting ticket | Scans, logs and expert help |
| Maintenance mode (if needed) | Protects visitors |
| Inform the team | Stops accidental re-infection |
When you find a WordPress site redirecting to spam, change passwords from the outside in, so the attacker cannot use one account to get back into another.
Use long, unique passwords, saved in a password manager, and turn on two-factor login wherever it is available. Two-factor login on your hosting and email accounts is one of the strongest protections against a WordPress site redirecting to spam happening again.
You do not need to become a security expert, but understanding where a WordPress site redirecting to spam usually gets infected helps you talk to your host or developer. I am explaining these at a high level only, so you know what to ask about.
“Nulled” means a paid theme or plugin downloaded free from an unofficial site. They are very common in India because they look like a way to save money. Many contain hidden malicious code. If your site uses any nulled theme or plugin, assume it is a likely cause.
Plugins and themes with known security holes are a common entry point. Attackers scan the internet for sites running old versions.
Attackers often create a new admin user with an ordinary-looking name so they can get back in later. Check the Users section for any admin you do not recognise.
Infected sites often have unfamiliar files in the main folders or in uploads. Your host’s scan or a security plugin can list files changed recently.
The redirect itself is usually a small piece of code injected into theme files, plugin files, the database or the site’s configuration, which sends some visitors elsewhere. A scan can find these. Do not try to edit core files yourself unless you know what you are doing.
If your WordPress password is the same as your email or hosting password, or simple like “admin123”, one leaked password can open everything.
| Where | What to ask your host or developer |
|---|---|
| Nulled themes or plugins | “Are any themes or plugins from unofficial sources?” |
| Outdated software | “Which plugins and themes have pending updates?” |
| Admin users | “Are there any admins we did not create?” |
| Files | “Which files changed recently?” |
| Injected code | “Can you scan theme, plugin and database for injected scripts?” |
| Passwords | “Were any passwords reused or weak?” |
Once the damage is contained, you need to clean hacked WordPress site files and the database completely. A WordPress site redirecting to spam that is only half-cleaned starts redirecting again. A half-clean site gets re-infected within days. You have three main choices.
Many hosting providers offer malware scanning, and some offer paid clean-up.
Well-known WordPress security plugins can scan for malware, compare core files with the official versions and flag suspicious code.
A professional or agency that specialises in WordPress security cleans files and database, removes backdoors, updates everything, hardens the site and helps with the Google review.
If you have a backup from before the infection, restoring it can be fastest. But the hole the attacker used is still there. After restoring, you must still update everything, remove nulled software and change all passwords, or the WordPress site redirecting to spam will come back.
| Choice | Cost | Thoroughness | Best for |
|---|---|---|---|
| Hosting scan and clean-up | Low to medium | Varies by host | First infection, simple sites |
| Security plugin | Low | Medium | Ongoing monitoring, light infections |
| Professional clean-up | Medium to high | High | Repeated or deep infections, business-critical sites |
| Restore clean backup plus hardening | Low | High if done properly | When a clean backup exists |
Whatever you choose, make sure these are done before you call it finished:
If Google has detected your WordPress site redirecting to spam, you may see a hacked website Google warning in search results or a red warning page in browsers. Removing it requires the Security Issues report in Google Search Console.
If your site is verified in Google Search Console, open the Security issues report. According to Google’s Search Console help on the Security Issues report, it covers three categories: hacked content, malware and unwanted software, and social engineering. Specific issues include code injection, content injection and URL injection, among others.
If your site is not verified in Search Console yet, verify it now. You cannot request a review without it.
Google’s help page is clear: fixing the issue on just some pages will not earn a partial return to search results. Use the sample URLs in the report to troubleshoot, but remember the list may not be complete. Fix the whole site.
Once every issue is fixed on every affected page, select Request Review in the security issues Search Console report. Google asks you to explain the issue, describe the steps you took, and document the outcome.
A simple review request might say:
“Our WordPress site was redirecting visitors to spam pages through injected code. We took a full backup, changed all passwords, removed an unknown admin user and a nulled plugin, cleaned infected theme files and the database with a malware scan, updated WordPress, all themes and plugins, and confirmed with fresh scans and tests on several devices that the redirect no longer occurs.”
Be specific and honest. Vague requests like “site is clean now” are less convincing.
Google’s help page says a review can take from a few days to a few weeks. It also warns that you should not resubmit while a request is pending, because doing so can lengthen the next review or get your site marked as a repeat offender.
So:
| Step in Search Console | What to do |
|---|---|
| Open Security issues | Read every issue and sample URL |
| Fix | Clean the whole site, not only sample pages |
| Request Review | Explain the issue, steps taken and outcome |
| Wait | A few days to a few weeks, no resubmitting |
| Result | If rejected, fix remaining issues before requesting again |
A WordPress site redirecting to spam often leaves another mess behind, even after the redirect stops: spam pages in Google’s index, sometimes thousands of them, with strange titles in other languages.
Type site:yourdomain.in in Google and scroll through the results. Look for pages you did not create: pharmacy, gambling, loans, adult content, or strange Japanese or Chinese titles.
After the clean-up, these spam URLs should return a “not found” or “gone” status when opened. If they still load content, the clean-up is not complete.
For a few very harmful spam URLs still showing in Google, Search Console’s Removals tool can temporarily hide them while Google updates its index.
Resubmit your real sitemap in Search Console so Google focuses on your genuine pages.
Over the next weeks, check Search Console’s Pages report. Spam URLs should gradually drop out, and your real pages should stay indexed.
Most small business sites in India run on shared hosting, often with several sites in one hosting account: the main business site, an old site, a test copy a developer made years ago. This matters when you have a WordPress site redirecting to spam.
If your host suspends the account because of malware, do not panic. Ask what they need to restore access for cleaning, usually a confirmation that you are working on it. Keep all communication in writing.
If you decide to pay someone to clean hacked WordPress site files and handle the Google review, ask these questions first. They separate serious help from people who will only “remove the redirect” for a week.
Anyone who refuses to answer, or promises a full clean in ten minutes without looking at the site, is not the right person. A proper clean-up of a WordPress site redirecting to spam takes careful work, and the report at the end is your proof for Google and your own records.
Cleaning once is not enough to stop a WordPress site redirecting to spam for good. Most sites that suffer a WordPress hacked redirect once get hit again within months if nothing changes. Here is a routine a busy owner can actually follow.
| How often | Task | Time |
|---|---|---|
| Weekly | Updates, user check, mobile test | 10 minutes |
| Monthly | Backups, scans, Search Console, remove unused plugins | 20 minutes |
| Always | No nulled software, strong passwords, two-factor, own logins | Habit |
You can also get alerts instead of checking by hand. My team has written about suspicious login alerts for account takeover and about automated security scans with alerts; the same idea, scaled down, works for a small business website, so you hear about a new admin user or a failed update the same day.
Many owners leave a WordPress site redirecting to spam for weeks because “the site still works for me”. Meanwhile:
For a small business, the website is often the first impression. If your WordPress site redirecting to spam is that first impression, it costs you customers you will never know you lost. While the site is being fixed, a clean WhatsApp catalog for your shop can keep customers reaching you.
The dentist’s site had a nulled page-builder plugin, an admin user called “wpsupport” that nobody had created, and a small injected script in the theme. His host’s scan found most of it. We removed the nulled plugin, replaced it with a properly licensed one, deleted the unknown admin, cleaned the files and database, updated everything, changed every password starting with his email, and turned on two-factor login. Google’s review came back clean after several days. He now gets an alert on his phone whenever a new admin is created, and his receptionist tests the site on her phone every Monday morning.
Most owners can handle the first hour and the prevention routine themselves. When a WordPress site redirecting to spam keeps coming back, or the site is too important to experiment with, my team can help you contain, clean and recover it, prepare the Search Console review request, and set up update, backup and login alerts so you hear about problems early. It is part of our Custom Services, and you can write to us at contact@upcomingtools.com. If you are a small business just starting with automation, automation for small Indian businesses without coding is a good place to begin.
Many WordPress hacked redirect scripts target only certain visitors, such as mobile users, visitors from Google search, visitors who are not logged in, or first-time visitors, so the owner does not notice. Test logged out, in a private window, on mobile data, by clicking your site from Google search.
Do not delete files in panic. Take a full backup of the current state, find any older clean backup, change passwords starting with your email and hosting account, remove unknown admins, and open a support ticket with your hosting company for a malware scan.
Clean the whole site, then open the Security Issues report in Google Search Console and select Request Review, explaining the issue, the steps you took and the outcome. Google says a review can take from a few days to a few weeks, and you should not resubmit while a request is pending.
A reputable security plugin can find and remove many infections and is useful for ongoing protection. For deep or repeated infections, a hosting clean-up service or a professional clean-up is more thorough. Whatever you use, update everything, remove nulled software and change all passwords afterwards.
Never use nulled themes or plugins, keep WordPress, themes and plugins updated, use strong unique passwords with two-factor login, give each person their own login with the lowest role needed, keep backups off the server, and test your site on mobile, logged out, every week.