When navigating to websites, enterprise intranets, single sign-on (SSO) portals, or administrative consoles in Safari on macOS, the browser may abort loading and present the error: “Safari cannot open the page because too many redirects occurred.” This circular loop occurs when a web server redirects a client request to a secondary URL, which in turn points back to the original address or another intermediate hop without reaching a terminal endpoint. This breakdown is typically caused by expired authentication cookies, conflicting HTTPS redirection rules, or mismatched cross-site tracking policies.
Clear Website Data and Stale Session Cookies for the Domain
The vast majority of redirect loops arise from corrupted or contradictory session tokens stored in Safari’s cookie database:
- Open Safari on your Mac.
- Click Safari in the top menu bar and select Settings (or press Command + Comma).
- Navigate to the Privacy tab.
- Click the Manage Website Data button.
- In the search box in the upper-right corner, type the domain name of the problematic site (e.g., microsoft.com or your internal intranet hostname).
- Select the matching entry and click Remove (or click Remove All if troubleshooting broadly).
- Click Done, quit Safari completely (Command + Q), relaunch it, and reload the target page.
Adjust Prevent Cross-Site Tracking and Advanced Privacy Protections
Single Sign-On (SSO) gateways (such as Okta, Azure AD, or Google Workspace) frequently pass temporary authorization tokens across third-party domains. Safari’s aggressive Intelligent Tracking Prevention (ITP) can strip these tokens, forcing the portal into an infinite login loop:
- In Safari Settings, select the Privacy tab.
- Temporarily uncheck Prevent cross-site tracking.
- In the Advanced tab, check Advanced Tracking and Fingerprinting Protection and temporarily test setting it to Off or In Private Browsing only.
- Reload the login gateway to determine if authentication completes cleanly.
Inspect Date and Time Synchronization
Security tokens (including OAuth JSON Web Tokens and SAML assertions) contain strict expiration timestamps. If your Mac clock differs by even two minutes from server time, session tokens are rejected immediately, generating repeated redirect requests:
- Open System Settings from the Apple menu.
- Click General > Date & Time.
- Ensure Set time and date automatically is enabled and linked to Apple’s time server (
time.apple.com).
Flush macOS DNS Resolution Cache
If the web host recently changed reverse proxy configurations or SSL endpoints, local DNS caches can route requests to legacy load balancers:
- Open Terminal (Applications > Utilities > Terminal).
- Execute the flush command:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder - Authenticate with your administrative password, relaunch Safari, and revisit the site.