Skip to content
Knowledge

/

Outages and repairs

Infection · foreign redirects

The site redirects to ads: how to stop the symptom and find the source of the infection.

The redirect may appear only for some users, devices or visits from Google. It’s a common way of hiding an infection from the site owner.

Last updated: 10 August 2026

Owner: Gotoweb technical team.

Author: Michał Madejski

Next step

Give the redirect target, the device, the traffic source and when you first saw it. Don’t clear the logs.

01

What this symptom really means

Malicious code may make the redirect conditional on the referrer, device, cookie, country or first visit. The administrator not seeing the symptom doesn’t confirm the site is clean.

02

A safe first step

Record the target URL, the full entry URL, the time, the device and the traffic source. Back up the files, database and logs before removing anything, so you keep material for analysis.

03

The most common layers of the cause

The code may be in application files, the database, the template, a module, the tag manager, an ad, a service worker, a cron job, an administrator account, or at the DNS and proxy layer.

04

What data to keep before making changes

You need screenshots, a HAR file or the URL chain, request logs, file change dates, a list of accounts, crons, recent updates and information about other sites on the same hosting.

05

What a responsible diagnosis looks like

The redirect condition is reproduced, files are compared with a trusted source, and the database, accounts, tasks and logs are checked. Cleaning is complete only once persistence and the possible entry point have been removed.

06

What not to do blind

Don’t delete the one script you found and consider the incident closed. Don’t restore an unverified backup onto an unsecured environment, because the infection may come back.

07

When you need technical help

Urgent help is needed when redirects affect payments or login, the host suspends the account, Google warns users or the infection returns after an earlier clean-up.

Does the redirect disappear and come back, or happen only to customers?

We’ll check files, the database, accounts, crons, logs and trigger conditions, and then secure the likely vector.

Only 3 required fields · reply within 1 business day · no obligation