Prevent automatic redirects in Firefox

35

11

Firefox used to prevent automatic redirects and have a button you could use to opt-in to a redirect. However, a update a couple of months ago eliminated this feature and now Firefox (version 35) always redirects automatic.

How can I get the old behavior back and block automatic redirects?

Tyler Durden

Posted 2015-02-07T05:51:54.210

Reputation: 4 710

Type the following instead of a URL about:preferences#advanced > check Warn me when websites try to redirect or reload the page. – ROMANIA_engineer – 2017-01-01T23:26:12.227

Answers

29

As of Firefox 56, the menu has now been "simplified" and the option is no longer available.

To turn on the redirect warning:

  1. Type about:config in the address bar
  2. Search for accessibility.blockautorefresh
  3. Set the value to True

Source: Mozilla Support Forum

dexgecko

Posted 2015-02-07T05:51:54.210

Reputation: 789

5Doesn't work any more. – Philippe – 2018-09-06T22:31:51.400

It did in my case. You're probably dealing with something different. Still works in FF 62. – Andrew – 2018-09-13T22:10:05.620

2

I'm still getting issues with something like https://duckduckgo.com/?q=%21g%20test

– dexgecko – 2018-09-14T19:57:20.270

@dexgecko It works for me, using your test. Did you keep having issues back after you posted? – Coldblackice – 2019-07-10T22:48:22.387

This initially didn't work for me. In order to diagnose another problem I was having, I disabled all extensions and my theme, refreshed Firefox, and reenabled everything one by one. I no longer have either problem. – Grault – 2019-07-17T08:04:10.440

9

On the top right, you have the 3 horizontal line menu icon as indicated in the picture below.

Menu icon in new Firefox

Click on options the advanced the> under accessibility > tick the box that says "Warn me when websites try to redirect or load another page".

Advanced options menu Firefox

Although this will restore the old behaviour... EVERY time you click on a link to another website, it will warn you. For example, when you Google something and click on a link, it goes through a couple of redirects before it takes you to the end page ... and you have to click accept each time, which will be a bit of a hassle. It may be that you are trying to block pop-ups. I recommend you read Pop-up blocking and explanation for Firefox (Official Mozilla Guidelines) in case that's what you are trying to do.

SleepingGod

Posted 2015-02-07T05:51:54.210

Reputation: 246

7Unfortunately this option is no longer available since Firefox now has a "simplified" menu. – dexgecko – 2017-11-04T05:17:50.013

@dexgecko With new updates try this addon: https://addons.mozilla.org/en-US/firefox/addon/redirect-control/

– SleepingGod – 2017-11-04T13:55:52.067

1There's a (maybe) easier option using the about:config. I've highlighted it in another answer. – dexgecko – 2017-11-04T14:50:56.827

5

Go to about:config and set network.http.redirection-limit to 1. At each redirection you will get a message "the page isn't redirecting properly". The address bar will show the next URL in the sequence of redirections. Press the Try Again button to accept each redirection.

Steve Pitchers

Posted 2015-02-07T05:51:54.210

Reputation: 271

3

Under the Tools menu in firefox 35.0.1 /Options/Advanced/General/ tab there's a block you can check to be warned when a site tries a redirect. A panel will rise the question at the top of the screen for the warning and then you can accept or ignore the redirect process. May be this will help you out.

If you still face this problem! Download and install this plugin that prevents automatic redirects

ADBlock

Disable 302 redirects!

Link 1

Link 2

Mahavirsinh Padhiyar

Posted 2015-02-07T05:51:54.210

Reputation: 205

3I have this turned on and I still get redirected automatically with no warning. – Tyler Durden – 2015-02-07T17:07:51.720

Download and install this plugin that prevents automatic redirects https://addons.mozilla.org/en-US/firefox/addon/adblock-plus/

– Mahavirsinh Padhiyar – 2015-02-09T04:43:16.850

If anyone get the solutions by this can mark the answer as a selected answer then :) – Mahavirsinh Padhiyar – 2015-02-10T11:52:44.107

Your answer does not work for 302 redirects. You did not test that, did you? – Mindwin – 2015-05-11T14:24:11.790

Disable 302 redirects Link 1 Link 2

– Mahavirsinh Padhiyar – 2015-05-12T05:08:54.077

0

There are redirects that appear to take you one place and take you somewhere else, which is like a form of malware. There are also redirects that eventually get you to where you expect to go, but get there via intermediate links that may be designed to track or to generate referral revenue. The second type may or may not be something people object to as a matter of principle, but these are often blocked by the browser, making them at least an annoyance.

You can handle redirects with warnings and opting-in. That is a good strategy if you rarely use web services that normally redirect as part of their operating model. However, if you frequent sites and services that redirect, the warning and opt-in requirement can become a pain in the butt.

In that case, you can deal with it by using an add-on that identifies the ultimate destination and takes you directly there. Firefox Quantum came out since this question was posted, so many of the legacy add-ons for this no longer work. I've tested several replacements for the legacy add-ons, and one I've found that seems to work well (actually better than the legacy add-ons I used), is Skip Redirect by Sebastian Blask.

It is configurable, including blacklisting and whitelisting using patterns:

enter image description here

Dangerous sites tend to be blocked by the browser, anyway, but if you do get redirected to a site that isn't as represented, you can add it to the blacklist.

The best strategy for dealing with redirects (warn/opt-in vs. bypass), will depend on whether the majority that you encounter are an unfortunate characteristic of sites and services you use.

fixer1234

Posted 2015-02-07T05:51:54.210

Reputation: 24 254