Error "Safari cannot open the page because too many redirects occurred"

Last Updated: Jul 26, 2024

Overview

When doing a web login for a mobile app, the browser sometimes shows the error:

too many redirects

This is handled by the Auth0 SDK and authenticating directly with Auth0 IDP. This is the error received:

Safari cannot open the page because too many redirects occurred.

This article presents what might be the cause for this error and how to resolve it.

Applies To

  • Browsers
  • Safari
  • Too many redirects error

Cause

  • This is a Safari-specific error. Refer to this document for more details.
  • This might occur when opening a page that is redirected to another page, which is then redirected to open the original page. If a webpage redirects too many times, it might have been set up in a way that is causing a redirect loop. In that case, the owner of the page will need to correct the issue

Solution

The issue might also relate to outdated redirect information in the browser cache or cookies. To find out:

  1. From the menu bar in Safari, choose Safari > Preferences, then click Privacy.
  2. Click Manage Website Data.
  3. Use the Search field to find the name of the redirecting website, then select the website and click Remove. Safari then removes all stored data for the website, including caches and cookies. This might cause the sign out of the website or change its behavior.
  4. Click Done, then close Safari preferences.

If the issue continues, repeat these steps, but instead of clicking Remove for the redirecting website, click Remove All to remove stored data for every website visited in Safari.

Another resolution to this issue is explained in this video:

Go to Settings > Safari > scroll down to Privacy & Security, toggle off Prevent Cross-site tracking , then scroll down to Advanced > Website Data and delete the page from the website data.