A decorative cartoon of an old desktop computer displaying redirect loop error

How To Fix ‘Too Many Redirects’ Error.

June 28, 2023

ERR_TOO_MANY_REDIRECTS is an error caused when a website is stuck in a redirect loop. A redirect loop occurs when one redirect points to another, which in turn points back to the first, creating an infinite loop and making the webpage inaccessible.

This guide will explore the most common causes of this issue and provide clear, actionable solutions to get your site back on track quickly.

What is a redirect loop?

A redirect loop is a series of misconfigured redirects where:

  • URL 1 points to URL 2
  • URL 2 points back to URL 1

This infinite loop prevents browsers from accessing the intended content. Redirect loops can impact individual web pages or the entire website, leading to severe consequences for user experience and SEO.

Depending on the browser or device used, you might see different error messages. For example, in Google Chrome, the error is shown as ERR_TOO_MANY_REDIRECTS.

screenshot of chrome err_too_many_redirects message

Quick fixes for ‘too many redirects’

Encountering the ‘err_too_many_redirects’ error can be a frustrating experience, especially when it prevents users from accessing your website. However, with a systematic approach, you can identify the root cause and implement a solution. If you’re receiving this error, follow these steps to resolve it efficiently:

Clear your server, proxy, and browser cache

Caching is a common practice used to speed up websites by storing a copy of your website’s files in a cache, or temporary storage. However, if these cached files become outdated or corrupted, they can cause issues like the ‘err_too_many_redirects’ error.

Clear your browser cache

Clearing your browser cache is a simple fix that can often resolve this error. Here’s how you can do it on the most common browsers:

Google Chrome:

  1. Click on the three dots in the top-right corner.
  2. Go to More Tools > Clear Browsing Data.
  3. Select Cached Images and Files and click Clear Data.

Mozilla Firefox:

  1. Click the menu button and choose Options.
  2. Select the Privacy & Security panel.
  3. Under Cookies and Site Data, click Clear Data. Uncheck Cookies and Site Data and confirm.

Safari:

  1. Go to Safari > Preferences.
  2. Select the Advanced tab and enable the Show Develop menu.
  3. Click Develop > Empty Caches.

Microsoft Edge:

  1. Click on the three dots in the top-right corner.
  2. Go to Settings > Privacy, Search, and Services.
  3. Under Clear Browsing Data, click Choose What to Clear and select Cached Images and Files.
  4. Click Clear Now.

Opera:

  1. Click on the Opera logo in the top-left corner.
  2. Go to Settings > Advanced > Privacy & Security.
  3. Under Clear Browsing Data, select Cached Images and Files and click Clear Data.

Brave:

  1. Click on the three lines in the top-right corner.
  2. Go to Settings > Privacy and Security > Clear Browsing Data.
  3. Select Cached Images and Files and click Clear Data.

After clearing the cache, restart your browser and check if the issue persists.

screenshot of clearing browser cookie on chrome

Clear your server cache

If the issue continues, clear your server-side cache. The process for clearing your server cache will depend on your hosting provider and the caching solutions you have in place. Here’s how to do it on some of the most popular platforms:

Kinsta:

  1. Log in to your MyKinsta dashboard.
  2. Select your site from the list.
  3. Go to caching.
  4. Click Clear all caches to remove the server-side cache.

Cloudflare:

  1. Log in to your Cloudflare account.
  2. Select your domain.
  3. Go to the Caching tab in the dashboard.
  4. Click Purge Everything to clear all cached content.

SiteGround:

  1. Log in to your SiteGround Site Tools.
  2. Navigate to Speed > Caching.
  3. Clear the Dynamic Cache or Memcached as needed.

WP Engine:

  1. Log in to your WP Engine User Portal.
  2. Select your site.
  3. Click on Caching in the top menu and then click Clear Cache.

Bluehost:

  1. Log in to your Bluehost account.
  2. Go to the Advanced section and find the Caching settings.
  3. Click Clear All Cache.

GoDaddy:

  1. Log in to your GoDaddy account and open the My Products page.
  2. Select your hosting plan and open cPanel Admin.
  3. Look for Cache Manager and clear the cache from there.

Clear your proxy cache

If you’re using a proxy server, outdated or corrupted files in the proxy cache could be causing the redirect loop. Clearing the proxy cache will depend on the specific proxy software or service you’re using. Again, if you’re unsure how to do this, consult with your service provider or a network administrator.

By clearing your caches, you ensure that your website is serving the most recent version of your content, which can help resolve the ‘err_too_many_redirects’ error. However, remember that clearing your cache can sometimes only be a temporary solution. If the error persists, you’ll need to investigate further to find the root cause of the redirect loop.

Check your website’s HTTPS settings

Incorrect HTTPS settings can often lead to the ‘err_too_many_redirects’ error. Here are some key areas to consider:

  • Ensure SSL Certificate Validity: Install a valid SSL certificate. Many hosting providers offer free options.
  • Avoid Forcing HTTPS Without SSL: Check your CMS or server configuration to prevent insecure redirects.
  • Review .htaccess or nginx.conf Files:

Check use of an SSL plugin on WordPress

While SSL plugins can be helpful, they can sometimes cause issues with your site’s HTTPS settings. These plugins can interfere with your .htaccess file or your server’s configuration, leading to redirect loops.

Instead of using a plugin, it’s recommended to manually configure your SSL settings. This can be done through your hosting provider or by editing your .htaccess file (for Apache servers) or your nginx.conf file (for Nginx servers).

Forcing HTTPS without an SSL certificate

Forcing your site to use HTTPS when you don’t have a valid SSL certificate can lead to a variety of issues, including redirect loops. Before you switch your site to HTTPS, make sure you have a valid SSL certificate installed.

Most hosting providers offer free SSL certificates through Let’s Encrypt. Once you’ve installed your certificate, you can then safely switch your site to HTTPS.

Apache/Nginx HTTP to HTTPS redirects

If you’re using an Apache or Nginx server, you can set up HTTP to HTTPS redirects directly on your server. This is a more efficient method than using a plugin or relying on your CMS to handle the redirects.

Here’s how you can set up these redirects:

Apache:

Open your .htaccess file. This is typically located in the root directory of your website.

Add the following lines to the file:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

This code tells the server to redirect all HTTP traffic to HTTPS.

Nginx:

Open your nginx.conf file. This is typically located in the /etc/nginx/ or /usr/local/nginx/ directory.

Add the following lines to the server block:

server {
    listen 80;
    server_name yourdomain.com www.yourdomain.com;
    return 301 https://$host$request_uri;
}

Replace ‘yourdomain.com’ with your actual domain name. This code tells the server to redirect all HTTP traffic to HTTPS.

Remember to back up your .htaccess or nginx.conf file before making any changes. If you’re unsure how to do this, it’s best to consult with a web developer or your hosting provider.

By ensuring your HTTPS settings are correctly configured, you can avoid the ‘err_too_many_redirects’ error being caused by an HTTP error.

Fix redirect rules

Redirect rules are instructions that guide your website’s visitors from one URL to another. These rules are often used to ensure users can still find your content if you’ve moved it to a new URL. However, if these rules are incorrectly set, they can cause a redirect loop. Here’s how you can investigate and fix these rules:

  • Check the order of redirects in your .htaccess or nginx.conf file.
  • Look for conflicting rules (e.g., www to non-www combined with HTTPS redirects).
  • Remove unnecessary rules and back up your configuration files before making changes.

Understanding redirect rules

Redirect rules are typically set in your website’s .htaccess file (for Apache servers) or nginx.conf file (for Nginx servers). These files contain instructions for how your server should handle requests for your website’s content.

For example, you might have a rule that redirects users from the ‘www’ version of your site to the non-www version, or vice versa. Or, you might have a rule that redirects users from an old URL to a new one.

Investigating redirect rules

To investigate your redirecti rules, you’ll need to access your .htaccess or nginx.conf file. This can typically be done through your hosting provider’s file manager or via FTP.

Once you’ve accessed the file, look for any rules that involve redirect. These will typically involve the ‘Redirect’ or ‘Rewrite’ directives for Apache, or the ‘rewrite’ directive for Nginx.

Fixing redirect rules

If you find a rule that seems to be causing a redirect loop, you’ll need to fix it. This could involve:

  • Removing the rule: If the rule is no longer needed, you can simply delete it from the file.
  • Modifying the rule: If the rule is needed but incorrectly set, you can modify it to correct the issue. This might involve changing the source or target URL, or changing the type of redirect (e.g., from a 301 permanent redirect to a 302 temporary redirect).
  • Ordering the rules: The order of your rules can also cause issues. If you have multiple rules that could apply to the same URL, the first rule in the file will take precedence. Make sure your rules are in the correct order to avoid conflicts.

Remember to backup your .htaccess or nginx.conf file before making any changes. If you’re unsure how to do this, it’s best to consult with a web developer or your hosting provider.

By carefully checking and correcting your website’s redirect rules, you can resolve the ‘err_too_many_redirects’ error and ensure your visitors can find the content they’re looking for.

Troubleshoot your website’s apps, integrations, plugins or themes

If your website uses a content management system like WordPress, 3rd party integrations, plugins or themes could be causing the redirect loop. Some plugins or themes may have redirection features that can conflict with your website’s settings or other plugins, or simply a conflicting plugin caused by an update can cause the error.

To troubleshoot this, you can disable all plugins and switch to a default theme. If the error disappears, you can then enable each plugin one by one until you find the one causing the issue.

screenshot of WordPress plugins page

Contact your hosting provider

If you’ve tried all the above steps and are still experiencing the ‘err_too_many_redirects’ error, it’s time to contact your hosting provider. They can help you troubleshoot the issue further and provide solutions.

Frequently asked questions

Why do i get err_too_many_redirects only in chrome?

Chrome’s caching mechanisms can sometimes retain outdated redirect data. Clearing the browser cache often resolves this.

Can clearing cookies fix redirect loops?

Yes, especially if cookies store outdated session data that contributes to the loop.

What’s the difference between a 301 and 302 redirect?

A 301 redirect is permanent, while a 302 redirect is temporary. Using the wrong type can cause redirect errors in some instances.

Bonus SEO tip: 301 redirects are better for SEO because they pass link equity to the new URL. Use 302 redirects when the URL will return, such as for a temporarily out-of-stock product.

Conclusion

The ‘err_too_many_redirects’ error can be frustrating, but with a bit of patience and troubleshooting, you can get your website back on track. Remember, the key is to understand that this error is caused by a redirect loop and to identify where that loop is occurring. Whether it’s due to browser cookies, HTTPS settings, redirection rules, or plugins, there’s always a solution.

We hope this guide has helped you understand how to fix too many redirects and get your website functioning smoothly again. If you’re still having trouble, don’t hesitate to reach out to us for further assistance. We’re here to help you navigate these technical issues so you can focus on what you do best – running your business.

About the author.

Toby Devonshire holding a laptop

Toby Devonshire

Founder of Blank Slate Digital.

With years of experience working alongside some of the biggest brands in the world, I’ve built my career in digital marketing on a genuine passion for helping businesses grow.

To become the founder of Blank Slate Digital, I’ve taken a self-taught journey to master digital strategies that deliver real results. Now, I’m here to share that knowledge with you, making complex marketing simple and achievable for every business.