Skip to main content
menu-icon.png

 

x
Optimizely Knowledge Base

Unblock Optimizely's default redirect check

relevant products:
  • Optimizely X Web Experimentation
  • Optimizely X Web Personalization
  • Optimizely Classic

THIS ARTICLE WILL HELP YOU:
  • Unblock Optimizely's five-second redirect block 

By default, when you set up a redirect experiment, Optimizely blocks other redirects for 5 seconds so that you don't cause an infinite loop of redirects.

For example, this might happen if you set a redirect test from www.example.com/original to www.example.com/redirect and you have set URL Targeting to a substring match for www.example.com. 

Because both the original and redirect page meet the targeting conditions, you will trigger an infinite redirect loop.

If you do not wish to have the 5 second check that blocks additional redirects for 5 seconds and are absolutely sure that your URL Targeting does not include any matches for the site being redirected, then you can unblock additional redirects by following the below instructions.

Optimizely Classic

In Optimizely Classic, you can unblock additional redirects with the Edit Code function by changing the value '_optimizely_redirect' to '_optimizely_redirect_no_cookie'.

Optimizely X

In Optimizely X, you can unblock additional redirects by checking the "Allow Additional Redirects" box in the Redirect settings sidebar.

redirects.png

If you are using the "Code" Implementation. You will need to create an unnamed function that must return the URL you wish to be re-directed to. Here is an example. In the example below,  "redirectedURL" will need to be replaced with your URL.

redirectedURL.png