How to Stop Unwanted Redirects in Your Browser

How to stop unwanted browser redirects caused by malware, adware, and malicious scripts. Step-by-step fixes for Chrome, Firefox, Edge, and Safari.

You click a link and end up somewhere you did not intend to go. A search result sends you to a page full of ads. Your browser opens new tabs on its own. Your homepage has changed to something you do not recognize.

Unwanted redirects are one of the most frustrating browser problems, and they range from merely annoying to genuinely dangerous. Some are caused by aggressive advertising scripts on otherwise legitimate websites. Others are symptoms of malware or adware installed on your machine.

This guide covers why unwanted redirects happen, how to stop them in every major browser, and how to identify and remove the root cause. For background on how redirects work at the HTTP level, see the HTTP Redirect Guide.

Why Unwanted Redirects Happen

Unwanted redirects have several distinct causes, and identifying which one is affecting you determines the fix.

Malicious Ads (Malvertising)

Ad networks sometimes serve ads that contain JavaScript redirect code. When the ad loads on a legitimate page, the script fires and sends your browser to another site, typically a scam page, fake virus warning, or sketchy product listing. The website you were visiting did not intend for this to happen. Their ad provider served a bad ad.

Malvertising redirects are intermittent. They do not happen every time you visit a site because the malicious ad is only served to some visitors in some ad rotations.

Browser Hijacker Malware

Browser hijackers are programs that modify your browser settings without your consent. They change your homepage, default search engine, or new tab page. They inject extra redirects into your web browsing so that your searches go through their servers before reaching the real search engine. This lets them collect your search data and inject their own ads.

Browser hijackers typically get installed alongside other software. You download a free utility, click through the installer without reading each screen, and end up with a toolbar or browser extension you never wanted.

Adware on Your Device

Adware is software that displays unwanted advertisements. Some adware operates at the system level, injecting ads and redirects into all browser traffic regardless of which browser you use. If you see redirects in Chrome, Firefox, and Edge, the problem is likely adware on your device rather than a browser-specific issue.

Compromised Websites

Sometimes the website itself has been compromised. An attacker injects redirect code into the site's pages, sending visitors to malicious destinations. This is common with WordPress sites that have outdated plugins or themes with known vulnerabilities.

If a site you trusted suddenly starts redirecting you, the site may have been hacked. For more on redirect-based attacks, see what is an open redirect.

Redirect Chains and Loops

Legitimate redirects can also cause problems when misconfigured. A redirect that points to another redirect that points back to the original creates a redirect loop that leaves your browser spinning.

How to Stop Redirects in Chrome

Chrome is the most targeted browser for unwanted redirects because it has the largest market share. Here is how to lock it down.

Block Pop-ups and Redirects

  1. Open Chrome and go to chrome://settings/content/popups
  2. Make sure "Don't allow sites to send pop-ups or use redirects" is selected
  3. Check the "Allowed" list below and remove any sites you do not recognize

This setting blocks most JavaScript-initiated redirects and pop-ups. It will not stop server-side redirects (those are legitimate HTTP behavior) but it catches the client-side scripts that malvertising relies on.

Check and Remove Suspicious Extensions

  1. Go to chrome://extensions/
  2. Review every installed extension
  3. Remove anything you do not recognize or did not intentionally install
  4. Pay special attention to extensions that request permissions to "read and change all your data on all websites"

Browser hijackers often install as extensions. If you find an extension you cannot remove (the Remove button is grayed out), it may have been installed by a policy. See the malware removal section below.

Reset Chrome Settings

If your homepage, search engine, or new tab page has been changed:

  1. Go to chrome://settings/reset
  2. Click "Restore settings to their original defaults"
  3. Confirm the reset

This resets your homepage, new tab page, search engine, and pinned tabs. It disables all extensions (but does not delete them). It clears temporary data and cookies. It does not delete your bookmarks, history, or saved passwords.

Use Chrome's Built-in Malware Scanner

  1. Go to chrome://settings/cleanup (Windows only)
  2. Click "Find" to let Chrome scan for harmful software
  3. Remove anything it finds

This feature uses Chrome's partnership with ESET to detect known browser hijackers and adware.

How to Stop Redirects in Firefox

Block Pop-up Windows

  1. Open Firefox and go to about:preferences#privacy
  2. Scroll to the Permissions section
  3. Make sure "Block pop-up windows" is checked
  4. Click Exceptions to review any allowed sites

Enable Enhanced Tracking Protection

  1. In about:preferences#privacy, set Enhanced Tracking Protection to "Strict"
  2. This blocks known tracking scripts and fingerprinters that sometimes trigger redirects

Strict mode may break some websites. If a site stops working correctly, you can add an exception for that specific site.

Check Extensions

  1. Go to about:addons
  2. Review the Extensions list
  3. Remove anything unfamiliar
  4. Check "Plugins" as well for any unwanted entries

Reset Firefox

  1. Go to about:support
  2. Click "Refresh Firefox" in the top right
  3. This resets settings and removes extensions while keeping bookmarks and passwords

How to Stop Redirects in Safari

Block Pop-ups

  1. Open Safari Preferences (Command + comma)
  2. Go to the Websites tab
  3. Click "Pop-up Windows" in the sidebar
  4. Set the default to "Block and Notify" or "Block"

Check Extensions

  1. In Safari Preferences, go to the Extensions tab
  2. Review installed extensions
  3. Uncheck or uninstall anything suspicious

Clear Website Data

  1. In Safari Preferences, go to the Privacy tab
  2. Click "Manage Website Data"
  3. Remove data for any suspicious sites, or click "Remove All"

Safari on macOS is less susceptible to browser hijackers than Chrome on Windows, but it is not immune. If Safari redirects persist after these steps, check for macOS-level adware.

How to Stop Redirects in Edge

Microsoft Edge shares Chrome's Chromium base, so the steps are similar.

  1. Go to edge://settings/content/popups and block pop-ups and redirects
  2. Go to edge://extensions/ and remove suspicious extensions
  3. Go to edge://settings/reset to restore defaults if needed
  4. Use Microsoft Defender (built into Windows) to scan for malware

Edge also has a "SmartScreen" feature that warns you about known malicious sites. Make sure it is enabled at edge://settings/privacy under "Microsoft Defender SmartScreen."

Removing Malware and Adware

If browser settings alone do not fix the problem, malware or adware is likely installed on your device.

Windows

Windows Security (built-in). Open Windows Security from the Start menu, go to "Virus & threat protection," and run a full scan. Windows Defender catches many common adware programs.

Malwarebytes (free version). Download Malwarebytes from malwarebytes.com, install it, and run a scan. Malwarebytes is particularly good at catching adware and browser hijackers that Windows Defender misses.

Check installed programs. Open Settings, then Apps, then Installed Apps. Sort by install date and look for anything installed around the time the redirects started. Common offenders include browser toolbars, "search assistants," "shopping helpers," and utilities with generic names you do not recognize.

Check the Windows hosts file. Some malware modifies C:\Windows\System32\drivers\etc\hosts to redirect domain lookups. Open the file in Notepad (run as administrator) and remove any entries you did not add. The file should be mostly comments (lines starting with #) and possibly a 127.0.0.1 localhost entry.

macOS

Malwarebytes for Mac. The free version scans for and removes adware. Many Mac users assume they do not need this, but macOS adware exists and is not uncommon.

Check Login Items. Open System Settings, then General, then Login Items. Remove anything unfamiliar that launches at startup.

Check LaunchAgents and LaunchDaemons. Look in ~/Library/LaunchAgents/, /Library/LaunchAgents/, and /Library/LaunchDaemons/ for unfamiliar .plist files. Adware often installs persistence mechanisms in these directories.

Check browser profiles. Some adware creates configuration profiles on macOS that enforce browser settings. Go to System Settings, then Privacy & Security, then Profiles. If a Profiles section exists and contains anything you did not install, remove it.

Browser Extensions That Block Redirects

After cleaning up any malware, you can add browser extensions that proactively block unwanted redirects.

uBlock Origin. The most effective general-purpose content blocker. It blocks malicious ads (the primary source of redirect attacks) before they load. Available for Chrome, Firefox, and Edge.

Skip Redirect. A browser extension specifically designed to skip redirect intermediaries. When a link routes through a tracking redirect before reaching the actual destination, Skip Redirect extracts the final URL and sends you there directly. Available for Firefox.

ClearURLs. Removes tracking parameters from URLs, which eliminates some redirect-based tracking. Available for Chrome and Firefox.

No browser extension can protect you from all unwanted redirects. Extensions work best against client-side redirects and malvertising. Server-side redirects happen before your browser is involved, so extensions cannot intercept them. The best defense is a combination of browser settings, a clean system, and a good content blocker.

Identifying the Source

If you are still seeing unwanted redirects after following the steps above, narrow down the source.

Test in a different browser. If the redirects happen in Chrome but not Firefox, the problem is Chrome-specific (likely an extension or setting). If they happen in every browser, the problem is at the system or network level.

Test on a different network. Some ISPs inject redirects into HTTP traffic (particularly for DNS errors or expired domains). Try a VPN or switch to a mobile hotspot. If the redirects stop, your network is the problem.

Test in incognito/private mode. Incognito mode disables most extensions and uses a clean session. If redirects stop in incognito, an extension is the likely cause.

Check your DNS settings. Some malware changes your DNS servers to ones that redirect certain domains. Check your network adapter settings and make sure your DNS is set to a trusted provider (Google DNS at 8.8.8.8, Cloudflare DNS at 1.1.1.1, or your ISP's default).

Check your router. In rare cases, malware compromises home routers and injects redirects at the network level. Log into your router's admin panel and check the DNS settings. If the DNS servers are set to addresses you do not recognize, reset the router and change the admin password.

Preventing Future Problems

Once your system is clean:

  • Keep your browser updated. Browser updates patch security vulnerabilities that redirect exploits target.
  • Be cautious with browser extensions. Only install extensions from the official web store, and keep the total number low.
  • Read installer screens carefully. Decline bundled software and toolbars during installations.
  • Use a content blocker. uBlock Origin blocks most malvertising before it loads.
  • Stick to HTTPS. Sites served over HTTPS cannot have their content modified in transit by your ISP or network. Look for the padlock icon in your browser's address bar.

Unwanted redirects are a solvable problem. Most cases come down to either a bad extension, adware on the device, or malvertising on specific sites. Systematic elimination (browser, extensions, system, network) will find the cause.

Trace redirects to find the problem

See every hop in a redirect chain, including the status codes and destinations. Identify where unwanted redirects are happening.

Try Redirect Tracer