Malicious HTTP redirect
Malicious HTTP redirect, website redirect injection, browser redirect abuse
A malicious redirect silently or deceptively sends visitors from a trusted website to a fraudulent or compromised destination. Attackers may target only selected devices, countries or users to evade routine checks.
MIGHT YOU BE AFFECTED?
Turn knowledge into action.
How does this work?
A compromised web server, injected JavaScript, altered rewrite rule, advertising script or third-party component redirects visitors to an attacker-controlled site. The first page may appear legitimate and the redirection may be conditional on device type, referrer or session. HTTPS on the destination does not prove that it is trustworthy.
REAL-WORLD EXAMPLE
« A WordPress website opens normally for its administrator, but visitors using a mobile phone are redirected through several unfamiliar domains to a fake antivirus warning that asks them to install malicious software. »
Typical sequence
- 1An attacker compromises a website or its advertising, CMS plug-in, JavaScript, reverse-proxy or rewrite configuration.
- 2They add a server-side redirect, injected browser script or malicious outbound link, sometimes limited to mobile visitors or particular referrers.
- 3A targeted visitor opens an otherwise familiar page and is sent through one or more redirects to a fraudulent destination.
- 4The destination attempts phishing, malware installation, fraudulent payment or unwanted software downloads.
Warning signs
- The address bar unexpectedly changes to a domain unrelated to the site originally visited.
- The redirect appears only on mobile, when coming from search results or for visitors in certain regions.
- HTTP 301/302 responses, JavaScript navigation or ad tags form an unfamiliar chain of destinations.
- Website files, .htaccess, web-server rules, CMS plug-ins or third-party scripts have changed without authorisation.
- Visitors report fake security alerts or payment requests that the site owner cannot reproduce consistently.
How to protect yourself
- Update the CMS, plug-ins, themes and server software; remove vulnerable or unused components.
- Restrict administrative access and apply MFA, least privilege and separate deployment accounts.
- Monitor the integrity of scripts, template files, redirects, DNS records and server rewrite rules.
- Use a restrictive Content Security Policy where feasible, while remembering that CSP cannot prevent every server-side redirect.
- Test public pages from different devices, user agents and entry points and inspect HTTP redirect chains.
- Review third-party scripts and advertising integrations, and keep known-good backups for recovery.
If you think you are affected
If you are a visitor, close the suspicious destination without submitting information or installing anything. If you entered credentials, change them on the genuine service and revoke sessions. If you own the website, temporarily stop the affected redirect or take the site offline, preserve server and access logs, inspect .htaccess, proxy rules, plug-ins and injected scripts, remove the entry point, rotate exposed credentials and restore clean files. Check both mobile and desktop paths before bringing the website back.
Last updated: 8 October 2026