WordPress Site Redirecting to Spam? Proven First-Hour Rescue Plan

WordPress Site Redirecting to Spam? Proven First-Hour Rescue Plan

Business Owners in India: Fixing a WordPress Site Redirecting to Spam, Hour by Hour

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.

What I do in the first hour of a hacked site

The Call: “My Website Opened a Casino Page”

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.

How to Confirm a WordPress Site Redirecting to Spam

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.

Why you may not see it

Attackers know that if the owner sees the redirect, they will fix it quickly. So a WordPress hacked redirect often only triggers when:

  • The visitor is on a mobile phone.
  • The visitor arrives from a Google search, not by typing the address.
  • The visitor is not logged in to WordPress.
  • The visitor is visiting for the first time, so a cookie is set to avoid repeating it.
  • The visitor is in a certain country.

That is why the dentist saw nothing on his office computer, where he was logged in and typed the address directly.

How to test properly

  1. Log out of WordPress on all your devices.
  2. Use a phone on mobile data, not your office Wi-Fi.
  3. Open a private or incognito window.
  4. Search for your business name on Google and click your site from the results.
  5. Try a few different pages, not only the homepage.
  6. Ask someone else on a different phone and network to do the same.
  7. Clear cookies or use a new private window for each test.

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.

Other signs

  • Google shows a warning before opening your site, or your results show strange titles in other languages.
  • Search Console shows a security issue or a sudden spike in pages you never created.
  • Your hosting company emails about malware or suspends the site.
  • New admin users appear in WordPress that you did not create.
  • Your site is slow or shows unknown pop-ups.
TestWhat it catches
Logged out, private windowRedirects hidden from logged-in admins
Mobile data on a phoneMobile-only redirects
Clicking from Google searchRedirects that target search visitors
Several pagesRedirects added only to some pages
Another person, another networkRedirects that fire only once per visitor

The First Hour of a WordPress Site Redirecting to Spam: Contain Before You Clean

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.

1. Do not panic-delete

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.

2. Take a full backup of the current state

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”.

3. Check for an older clean 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.

4. Change passwords

The attacker may still have access. Change passwords in the order explained in the next section.

5. Open a ticket with your hosting company

Tell them your site is redirecting visitors to spam and ask:

  • Can they run a malware scan?
  • Can they show recent file changes?
  • Do they offer a clean-up service?
  • Are other sites on your account affected?

Most Indian hosting companies have a support ticket or chat. A written ticket is better than a call, because you keep a record.

6. Consider maintenance mode

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.

7. Tell your team

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 stepWhy
Do not delete thingsKeeps clues and avoids breaking the site
Backup current stateEvidence and a safety net
Find older clean backupA possible quick recovery path
Change passwordsLocks out the attacker
Hosting ticketScans, logs and expert help
Maintenance mode (if needed)Protects visitors
Inform the teamStops accidental re-infection

Passwords to Change, in Order

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.

  1. Your email account linked to hosting and WordPress. If the attacker controls your email, they can reset everything else.
  2. Hosting account (the main control panel login).
  3. WordPress admin accounts. Every admin, not only yours. Remove any admin you do not recognise.
  4. Database password, through your hosting panel. Your developer or host may need to update it in the site’s configuration so the site keeps working.
  5. FTP or file manager accounts.
  6. Any other service connected to the site, like a CDN, payment plugin or email service.

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.

Where the Infection Usually Hides

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 themes and plugins

“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.

Outdated plugins and themes

Plugins and themes with known security holes are a common entry point. Attackers scan the internet for sites running old versions.

Unknown admin users

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.

Unknown files

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.

Injected scripts

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.

Weak or reused passwords

If your WordPress password is the same as your email or hosting password, or simple like “admin123”, one leaked password can open everything.

WhereWhat 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?”

Clean Hacked WordPress Site: Your Three Choices

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.

Choice 1: Hosting company malware scan and clean-up

Many hosting providers offer malware scanning, and some offer paid clean-up.

  • Good: they already have access to your server and logs, and know their platform.
  • Watch out: some scans only flag files without cleaning the database, and some clean-ups are basic.

Choice 2: A reputable security plugin

Well-known WordPress security plugins can scan for malware, compare core files with the official versions and flag suspicious code.

  • Good: affordable, and useful for ongoing protection.
  • Watch out: if the attacker has deep access, a plugin running inside the infected site may miss things. Install only from the official WordPress plugin directory or the vendor’s own site.

Choice 3: A professional clean-up

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.

  • Good: most thorough, especially for repeated infections.
  • Watch out: costs more, and quality varies. Ask what is included, whether they offer a guarantee period, and whether they handle the Search Console review.

Restoring a clean backup after a WordPress site redirecting to spam

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.

ChoiceCostThoroughnessBest for
Hosting scan and clean-upLow to mediumVaries by hostFirst infection, simple sites
Security pluginLowMediumOngoing monitoring, light infections
Professional clean-upMedium to highHighRepeated or deep infections, business-critical sites
Restore clean backup plus hardeningLowHigh if done properlyWhen a clean backup exists

After any clean-up

Whatever you choose, make sure these are done before you call it finished:

  • All themes, plugins and WordPress core updated.
  • All nulled and unused themes and plugins removed.
  • Unknown admin users removed.
  • All passwords changed again after the clean-up.
  • A fresh scan shows no issues.
  • The redirect tests from the first section pass on several devices.

Hacked Website Google Warning: Removing It

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.

Open the security issues Search Console report

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.

Fix every affected page

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.

Request a review

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.

How Long the Review Takes and What Not to Do

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:

  • Request the review only once, after the full clean-up.
  • Wait patiently for the result.
  • Keep testing the site in the meantime to make sure the WordPress hacked redirect has not come back.
  • If the review fails, read the reason, fix what remains, and only then request again.
Step in Search ConsoleWhat to do
Open Security issuesRead every issue and sample URL
FixClean the whole site, not only sample pages
Request ReviewExplain the issue, steps taken and outcome
WaitA few days to a few weeks, no resubmitting
ResultIf rejected, fix remaining issues before requesting again

Checking Your Search Results After the Clean-Up

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.

Search your own site on Google

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.

Make sure spam pages are gone

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.

Use the Removals tool for urgent cases

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 sitemap

Resubmit your real sitemap in Search Console so Google focuses on your genuine pages.

Watch the Pages report

Over the next weeks, check Search Console’s Pages report. Spam URLs should gradually drop out, and your real pages should stay indexed.

If Your WordPress Site Redirecting to Spam Is on Shared Hosting

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.

  • Every site in the account can be infected, because they share the same files area. Cleaning only your main site often leads to re-infection from the forgotten test site.
  • Delete sites you no longer use, after taking a backup. Old, unmaintained copies are a common entry point.
  • Scan the whole account, not only the site you noticed.
  • Ask your host whether the infection came from your account or from the server, and whether they have seen the same issue on other customers.

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.

Questions to Ask Before You Hire Help

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.

  1. What exactly will you clean? Files, database, users and configuration, or only the visible redirect?
  2. Will you find how the attacker got in? Without this, the WordPress site redirecting to spam will come back.
  3. Will you remove nulled software and update everything?
  4. Will you prepare and submit the security issues Search Console review request, or help me do it?
  5. Is there a guarantee period if the problem returns?
  6. Will you take a backup before starting and keep it?
  7. What will you hand over at the end? A short report of what was found and fixed, and the new access details.

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.

A Prevention Routine for Busy Owners

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.

Weekly (10 minutes)

  • Update WordPress core, plugins and themes, or check that automatic updates ran.
  • Glance at the Users section for any new admin.
  • Open your site on your phone, logged out, from a Google search.

Monthly (20 minutes)

  • Check that backups are running and stored off the server.
  • Review the security plugin or hosting scan reports.
  • Check Search Console for security issues or strange new pages.
  • Delete plugins and themes you do not use.

Always

  • Never install nulled themes or plugins. If you cannot afford a premium plugin, use a good free one from the official directory.
  • Use unique, strong passwords and a password manager.
  • Turn on two-factor login on email, hosting and WordPress.
  • Give each person their own login with the lowest role they need, and remove access when they leave.
  • Keep at least one backup off the server, so a hack or a hosting problem cannot destroy it.
How oftenTaskTime
WeeklyUpdates, user check, mobile test10 minutes
MonthlyBackups, scans, Search Console, remove unused plugins20 minutes
AlwaysNo nulled software, strong passwords, two-factor, own loginsHabit

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.

What It Costs When You Ignore It

Many owners leave a WordPress site redirecting to spam for weeks because “the site still works for me”. Meanwhile:

  • Customers lose trust. A patient, a buyer or a parent who lands on a betting page will not come back, and may tell others.
  • Google traffic drops. Warnings and spam pages hurt your search presence.
  • Ads may stop. Ad platforms often reject or pause ads that lead to compromised sites.
  • Email may suffer. Hacked sites sometimes send spam, which can harm your domain’s email reputation.
  • The hack spreads. Other sites on the same hosting account can be infected.

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.

What the Dentist’s Site Looks Like Now

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.

Where My Team Fits In

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.

Questions Owners Ask Me About Hacked Sites

Why is my WordPress site redirecting to spam only on mobile?

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.

What should I do first when my website is hacked?

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.

How do I remove the hacked website Google warning?

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.

Can a security plugin clean a hacked WordPress site?

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.

How do I stop my WordPress site from being hacked again?

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.

Radha Krishna

I am Radhakrishna, Founder and lead author at UpcomingTools.com, where I write Business Guides and Automation Guides for low investment automation in India. With 3 to 5 years offline experience serving small businesses only through trust and referrals, I now build software only workflows for lead follow up, bookings, quotes, stock, invoices and reporting and fix failed runs, expired tokens and unsafe AI and RAG answers. Every guide and workflow is written and decided by me, personally checked and live tested before publishing. I build in your own accounts on live, so your keys stay yours, show a rough demo before build and give 3 to 6 months free support with free tool help and ZERO SERVICE CHARGE for eligible starters.

Leave a Comment

UpcomingTools logo - Nation First, Build The Best, Pass The Test