Skip to content
Mohammad Emmon Mohammad Emmon.

Conditional Redirect Malware: Signs, Detection, and Removal in Dubai

Updated 31 Oct 2026 10 min read By Mohammad Emmon
Mobile visitor redirected from a WordPress site to a spam page

Quick answer

If visitors land on spam sites but you do not, your site likely has conditional redirect malware. It targets mobile users, first-time visitors or traffic from Google while hiding from admins. The malicious code usually sits in theme files, .htaccess, plugins or the database, so it needs a full manual scan and cleanup, not just a plugin scan.

On this page

Conditional redirect malware sends some of your visitors to spam or scam sites while letting others, including you, see your normal website. It picks its targets on purpose, which is why your customers report it and you cannot make it happen.

The malware checks each visitor before it acts. It looks at cookies, login status, device, where the visit came from, and sometimes plain chance. If the visitor looks like the owner or a search bot, nothing happens. If they look like a fresh customer, they get sent away.

Customers struggle with this because a problem they cannot reproduce feels like a problem that is not real. It is real, and it is common. Sucuri's SiteCheck Malware Trends Report 2024 found that active malware and malicious redirects made up 74.7% of all the infections it detected. This article explains how the redirect skips you, the signs to watch, how to make it happen on purpose, where the code hides, and how a proper cleanup works.

What Is Conditional Redirect Malware?

Conditional redirect malware is code injected into a website that redirects visitors only when certain conditions are met. The conditions are chosen to keep the owner, the developer, and search engines from noticing.

The redirect usually lands on a scam, a fake prize page, adult content, or a page that pushes a harmful download. The attacker earns money from each visitor sent. Keeping the owner blind keeps that money flowing for longer.

How Is It Different From a Normal Redirect Hack?

A normal redirect hack sends every visitor away, every time. It is loud. The owner sees it in minutes and gets it fixed.

A conditional redirect is quiet on purpose. It fires for a slice of visitors and hides from everyone else. That makes it harder to prove, harder to find, and much longer lived.

Why Does the Redirect Skip You and Hit Your Customers?

The redirect skips you because it is built to recognise you. Five conditions do most of the work, and many infections use several at once.

1. It Sets a Cookie and Skips Repeat Visitors

The malware drops a cookie on the first visit and skips anyone who already has it. Sucuri's write-up on the Test0.com and Default7.com redirect hack found a cookie set for one year, so a visitor redirected once was not redirected again.

You visit your own site every day. You carry the cookie, so you never see the redirect again.

2. It Checks Whether You Are Logged In

Some redirect code checks for the WordPress login cookie and stays quiet for anyone logged in. The owner and the developer are almost always logged in, so they see a clean site.

3. It Only Fires on Mobile or a Specific Browser

Some redirects only fire for phones or one browser type. The malware reads the visitor's user agent, which names the device and browser. If you check from a desktop, you see nothing.

4. It Only Fires When the Visitor Arrives From Search

Some redirects only fire when the visitor arrives from a search result. Typing your own address or using a bookmark skips the redirect. A customer who searched for your business does not.

5. It Fires on a Small Percentage of Visits

Some redirects fire at random on a small share of visits. Sucuri's Test0.com report found the redirect fired for about 15% of eligible visitors, and it skipped search engine crawlers on purpose. So roughly six out of seven visits look normal, even for a stranger.

What Are the Signs of a Conditional Redirect?

The signs of a conditional redirect come from other people and from your data, not from your own browser. Four signs matter most.

1. Customers Report It and You Cannot Reproduce It

A customer says your site sent them somewhere strange, and you cannot repeat it. That is the classic sign. Believe the customer, and ask what device they used and how they reached the site.

2. Search Traffic Falls While Rankings Hold

Your rankings hold but sales and enquiries from search drop. This problem happens when the redirect targets search visitors. Google still ranks the page, but the people who click never reach it.

3. Your Analytics Show Sessions With No Pageviews

Analytics showing visits that leave instantly, with no second page, point to visitors being sent away. If the pattern is strongest on mobile or search traffic, the match is close.

4. Ad Platforms Flag Your Landing Page

Ad platforms such as Google Ads test landing pages with their own systems. If yours is flagged or disapproved for malicious or unsafe content, their test hit the redirect. A browser Deceptive site ahead warning is a later, louder version of the same sign.

How Do You Reproduce the Redirect on Purpose?

You reproduce the redirect by becoming the visitor it targets. Each condition has a matching test.

1. Test in a Private Window With No Cookies

Open a private or incognito window and visit the site while logged out. That clears the cookie and the login check in one move. Try several pages, and close the window between tries.

2. Test From a Real Mobile Device

Use a real phone on mobile data, not Wi-Fi. Mobile data gives you a different network address from your office. A desktop browser pretending to be a phone does not always fool the code.

3. Arrive Through a Search Result, Not a Bookmark

Search Google for your business and click your own result. That sets the search referrer, which is what the code checks. Repeat this a few times in fresh private windows, because a random 15% trigger needs several tries.

4. Inspect the Page the Way Google Sees It

Use the URL Inspection tool in Google Search Console to see the page as Google crawled it. Google's guide to the cloaked keywords and links hack says this reveals hidden content a visitor cannot see. The same trick hides cloaked spam pages from owners.

Where Does the Redirect Code Hide?

The redirect code hides in five common places, and the best ones are the places nobody checks.

1. In the Active Theme's header.php or footer.php

The active theme's header.php and footer.php load on every page, which makes them a prime target. Sucuri's Test0.com report found the code added to the top of the active theme's header.php, with a footer.php variant. WordPress.org's hacked-site FAQ names header.php, footer.php, index.php, and .htaccess among the files to inspect first.

2. In the Database Instead of the Files

Some redirects live in the database, not the files. Sucuri's PHP Reinfector report described malware hiding its settings in options with hexadecimal names in wp_options, encoded in Base64. A file scan never reads them.

3. In a Rewritten .htaccess File

A rewritten .htaccess file can redirect visitors before WordPress even loads. The rules can check the referrer and the device, which is exactly how a search-only or mobile-only redirect works.

4. In a JavaScript File or an Injected Script Tag

A redirect can sit in a JavaScript file or a script tag injected into your pages or posts. The script runs in the visitor's browser, so it can check the device, cookies, and referrer there.

5. In the Must-Use Plugins Directory

The must-use plugins folder runs code automatically and does not appear in the normal plugin list. Sucuri found a backdoor at wp-content/mu-plugins/wp-index.php that could not be turned off from the admin panel. It stored its payload in the database under _hdra_core and created a hidden admin user, officialwp, which is why unknown WordPress admin users need checking too.

How Does a Professional Redirect Cleanup Work?

A professional redirect cleanup works by finding every copy of the code, the backdoor that put it there, and the hole the attacker used. The system works by checking all five hiding places, not just the one where the first copy turned up.

The specialist compares core files against WordPress.org's official checksums with the WP-CLI command wp core verify-checksums. Then they read the theme files, the .htaccess file, the must-use plugins folder, and the database options and posts.

A redirect removal plugin is often the first thing owners try, and it is exactly what fails here. A plugin scan reads files. It does not read hex-named database options, and a must-use plugin may hide from it. Sucuri found at least one backdoor on 49.21% of compromised sites, so removing the redirect without the backdoor brings it back.

Last, the specialist tests with every reproduction method above, to prove the redirect is gone for every kind of visitor.

How Do You Stop the Redirect From Coming Back?

You stop the redirect from coming back by closing the hole and watching the hiding places. A cleanup that skips the cause means the redirect returns in days or weeks.

Read why the redirect returns after a quick fix, because the same backdoors are at work. Then update or remove the plugin or theme that let the attacker in, change every password, and remove any admin you did not create. Keep a file integrity monitor running, check the must-use plugins folder each month, and test your site in a private window from a phone now and then. If your site feels slower without a reason, check for injected scripts.

How Much Does Redirect Malware Removal Cost in Dubai?

Redirect malware removal costs depend on how many places the code hides, and published platform prices give a fair guide. Sucuri lists its Website Security Platform at 229, 339, and 549 USD per year with unlimited malware removals, as checked on 4 October 2026. Wordfence lists Care at 590 USD and Response at 1,250 USD per year, as recorded on 30 September 2026.

I do not publish a fixed rate, because a single injected script is a smaller job than a redirect with a database payload and an mu-plugins backdoor. The free security check shows which you have. The UAE market bands are in redirect removal pricing for Dubai.

If you are weighing the cost against doing nothing, the benefits of WordPress security services puts the return in business terms, and what website security covers shows where redirect malware removal sits among the other layers.

Redirect Malware Removal in Dubai by Mohammad Emmon

How Mohammad Emmon Handles Conditional Redirect Malware

I start by making the redirect happen, because evidence beats guessing. I test as a fresh visitor, on mobile, from search, and the way Google sees the page. Then I search every hiding place, remove the code and the backdoor, and close the entry point.

This work is part of my WordPress malware removal and security service, and that page sets out exactly what a redirect malware removal job includes. You get a written finding of where the code was and how it got in.

Dubai Business and Hospitality Site Coverage

I work with businesses across Dubai and the wider UAE, including hotels, restaurants, clinics, and online stores. Many Dubai customers book from a phone after a search, which is exactly the visitor a conditional redirect targets.

If you want a WordPress security specialist for UAE businesses rather than a platform, that page explains how I work, and the local detail sits on my pages for Dubai WordPress security and Abu Dhabi WordPress security.

Get a Free Security Check from Mohammad Emmon

The free security check tests your site the way the redirect chooses its targets, so you find out whether your customers are being sent away. You get a written finding whether or not you hire me. Message me on WhatsApp or book a call.

Contact Mohammad Emmon today for a free security check and make sure every visitor reaches your real website.




Free security check

Worried your site is infected?

Get a free security check — I'll tell you if your WordPress site is compromised and exactly what it needs. No obligation.

Related

Take it further.

Mohammad Emmon

Written by

Mohammad Emmon

WordPress Malware Removal, Security, Ongoing Security Monitoring And Website Development

I'm a WordPress malware removal and security specialist — I've cleaned and secured over 10,000 sites. Once a site is safe, I can also build, run and automate the whole thing. Based in Dhaka, working worldwide.

  • 15,000+ sites secured
  • 745+ businesses
  • 96% come back

Worried about your site?

Think your WordPress site is hacked? Let's check it.

Google Business Profile

Find me on the map

Open in Google Maps