URL redirection is necessary when pages have changed their addresses permanently or temporarily. However, sometimes your website can get stuck in a redirection loop. If this happens, you may face the “too many redirects” error that prevents you from accessing web pages. Fortunately, you can use several methods to fix this redirection issue. The problem usually lies within your website, browser, server, or third-party plugins or programs. By taking the time to diagnose the cause of the error, you can solve it relatively quickly.
Causes of the “Too Many Redirects” error on WordPress
The “too many redirects” error happens when your WordPress website gets stuck in redirection loops. For example, it may try to send you to another URL that points to an entirely different link. If this process continues, your browser may trigger the error and fail to load the site. This error looks different depending on the browser you use. For example:
- Google Chrome, it usually displays as “ERR_TOO_MANY_REDIRECTS” or “This webpage has a redirect loop.”
- Mozilla Firefox, the error usually reads as “The page isn’t redirecting properly.”
- Microsoft Edge, it displays as “This page isn’t working right now.”
- Safari users may encounter “Safari Can’t Open the Page.”
Unlike some other common WordPress errors, the “too many redirects” issue doesn’t usually solve itself. As such, you’ll need to troubleshoot the origins of the problem to fix it.
How to fix the “Too Many Redirects” error on WordPress
Various factors can cause the “too many redirects” error on WordPress. Therefore, you may need to try a few different methods to solve it. Here are the possible solutions.
1. Force the page to refresh
The first solution is a very simple one. You can force your browser to refresh and retrieve a new version of the page. This method overrides any stored data and displays the latest information available for the WordPress website. You might like to try this method first because it’s quick and won’t interfere with any other strategies. You’ll also know straight away if it has fixed the problem or not. You can use the following keyboard shortcuts to force a refresh in your browser:
- Google Chrome (Windows): Ctrl + F5
- Google Chrome (Mac): Command + Shift + R
- Safari: Command + Option + R
- Firefox (Windows): Ctrl + F5
- Firefox (Mac): Command + Shift + R
- Microsoft Edge: Ctrl + F5
That’s all you need to do. However, if this simple method doesn’t work, you can continue through this troubleshooting guide.
2. Delete cookies on the site
Cookies are small blocks of data that enable websites to remember information about your visit. Then, the sites use that data to customize your experiences. For example, an e-commerce platform might send you on-site recommendations based on your previous purchases and searches.
This way, you’ll be able to save time when looking for related products. However, cookies can sometimes hold onto incorrect data. In turn, this can cause the “too many redirects” error. As such, you can try deleting cookies from the WordPress site. You’ll need to use slightly different methods depending with the browser you are using.
3. Clear your WordPress site or server cache
Caching stores information about your site so that it can load faster the next time you access it. However, your cache may be holding outdated data and causing a redirection error. Therefore, you can try clearing out the stored information to see if it fixes the problem. If you can access your WordPress site, you can try clearing the cache with a dedicated caching plugin. However, the redirection error will likely prevent you from getting to your dashboard. Therefore, you might need to try clearing your server cache. Once you’ve cleared out the cache, try reloading your site. If that doesn’t work, you may need to try another method.
4. Clear your browser cache
Your browser also stores cached information about the websites you visit, including your own. If your browser is holding onto outdated data, you may need to clear it out to fix the redirection error in WordPress. You’ll need to use slightly different methods depending with the browser you are using. When you’re done, try reloading your site to see if the “too many redirects” error has gone.
5. Determine the cause of the redirect loop
If the earlier methods didn’t solve the redirection error, you might like to try to diagnose the problem. Otherwise, you might spend a lot of effort on more time-consuming strategies that may not fix the error. There are a couple of different methods that can determine the cause of redirect loops. Firstly, you can enter your site’s URL into the Redirect Checker tool.
This free online application enables you to enter multiple URLs and check their statuses. You can also specify the user agent, such as your browser, search engine bots, and mobile devices. Once you enter your URL, you’ll be able to see any status or error codes associated with your site at the bottom of the page.
Alternatively, some browser add-ons can show you the nature of redirects on different sites. For example, the Redirect Path Chrome extension flags redirect error messages in real-time. However, these tools might not always tell you why your redirect error is happening. If this is the case, you can continue with the other strategies in this troubleshooting guide.
6. Temporarily disable your WordPress plugins
WordPress plugins are helpful tools that can introduce new functionalities to your website. However, these add-ons can also cause many issues, such as the “too many redirects” error. Anyone can develop and share WordPress plugins. As such, you may accidentally download one that contains faulty code. These add-ons also have frequent updates.
If you haven’t updated your plugins, they may also be causing problems on your site. You may like to try this method if you recently added new plugins to your WordPress site. If so, you’ll probably have a good idea of the one causing the problem. Even if you don’t suspect a particular plugin, you can use the following steps to address the issue.
If you can’t access your WordPress site, you’ll need to use cPanel or FTP/SFTP. You’ll need to find the folder that holds your plugins, usually under public_html > wp-content > plugins. Here, you’ll see a series of folders with the names of your installed plugins. Rename the plugins folder to “plugins-off”. This will deactivate all of your plugins.
You should now be able to access your WordPress dashboard. Next, rename your plugins folder to its original title. Then go through the process of reactivating each add-on from your WordPress dashboard to see which one throws the “too many redirects” error. If you find a problem plugin, you’ll need to keep it deactivated. You’ll also need to find an alternative option for your website.
7. Check Your WordPress site settings
Sometimes an error in your WordPress site settings can cause redirect loops. For example, your website might be pointing to the wrong domain name for your site files. This more commonly happens if you’ve recently migrated your website. You can check your site settings in your WordPress dashboard. If you can access it, log in and head to Settings > General. You’ll then see two fields for “WordPress Address (URL)” and “Site Address (URL)”.
These two addresses should be identical unless you want WordPress to have its own directory. If the URLs don’t match, and they should, you can change the settings manually. You’ll need to edit your site’s wp-config.php file. Use cPanel or FTP/SFTP to locate the wp-config.php file, its located under the public_html folder. Next, you’re going to paste the following code into the file:
define( 'WP_HOME', 'https://example.com' );
define( 'WP_SITEURL', 'https://example.com' );
Replace the example URLs with the correct ones and save the file. Then reload your website and see if this solved the problem.
8. Check your SSL certificate
If you’ve recently migrated your site to HTTPS, there are various steps you need to complete. Unfortunately, if you miss some of them or misconfigure some settings, you could trigger the “too many redirects” error on WordPress. For example, if you didn’t install your Secure Sockets Layer (SSL) certificate correctly, it could be causing problems. If you didn’t add it at all, your site would automatically get stuck in a redirect loop.
However, there might also be some minor issues with your SSL certificate installation. For example, you might have incorrectly installed the intermediate certificates that work together with your main one. You can check if your SSL certificate is correctly installed using a tool such as the Qualys SSL Server Test. This application scans your domain to find any associated SSL issues. This process can take a few minutes, but it will alert you to any problems with your certificate installation.
9. Update your hard-coded links
If you’ve just switched from HTTP to HTTPS, you’ll need to redirect your links. Otherwise, these URLs will point to locations that no longer exist on your website. Many users utilize plugins that can change these links automatically. However, it can be risky to use an add-on. If your chosen plugin has any issues with its code or updates, it can misconfigure your redirects and trigger the “too many redirects” error. As such, it’s recommended that you manually update your hard-coded links. You can do this with the search and replace method on WordPress.
10. Check for HTTPS redirects on your server
HTTPS redirect server rules can also cause the “too many redirects” error on WordPress. These settings may have been misconfigured when you migrated your site. For example, the settings may not be correctly redirecting your links to HTTPS. As such, you’ll need to amend them. If your host uses an Apache server, you’ll need to edit your .htaccess file. Locate it using cPanel or FTP/SFTP. Then, you can enter the following code:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
This code will cause all HTTP links to redirect to HTTPS automatically. Save the .htaccess file and try to reload your WordPress site. If it still triggers the redirect error, you’ll need to try another solution. Alternatively, you can adjust your HTTPS redirects on Nginx servers. If you’re not sure which server type your host uses, you might like to double-check with the company first. In Nginx, you’ll need to adjust the config file. Use cPanel or FTP/SFTP to locate the file. Insert the following code to set up your redirects:
server { listen 80; server_name domain.com www.domain.com; return 301 https://domain.com$request_uri; }
Save the file and reload your WordPress site. If it doesn’t fix the problem, keep moving through this troubleshooting guide.
11. Check your third-party service settings
Suppose you use a third-party service such as a Content Delivery Network (CDN). In that case, its settings may cause the “too many redirects” error. For example, Cloudflare is a popular option that can improve your website’s performance and security. Cloudflare can trigger the “too many redirects” error if you have the Flexible SSL setting enabled and an SSL certificate from another source (such as your hosting provider).
In this scenario, your hosting server requests are already redirecting URLs from HTTP to HTTPS. However, with the “Flexible SSL” setting, all server requests are being sent in HTTP. As such, there are redirection loops happening between the different processes. As such, don’t use the “Flexible SSL” setting if you have an SSL certificate from a third-party source. Instead, change your Cloudflare “Crypto” settings and choose either “Full” or “Full (strict)”.
Doing so will automatically send requests in HTTPS. Additionally, you may like to enable the “Always Use HTTPS” rule in Cloudflare. This forces your site to send all requests in HTTPS. Therefore, it avoids causing a redirect loop and triggering the WordPress error. Finally, you might like to double-check that you’ve correctly configured your redirects in Cloudflare. For example, you’ll want to ensure that your domain doesn’t redirect to itself. Otherwise, it can trigger a redirect error.
12. Check redirects on your server
Apart from HTTPS redirects, other redirects can trigger an error when loading your WordPress website. For example, you might have a 301 redirect misconfigured. It might be pointing to the original link, triggering a redirect loop that prevents your site from loading. You can usually find redirects such as this one by checking your config files.
If your host uses an Apache server, you may have issues with your .htaccess file. Try creating a new one with default settings. Use cPanel or FTP/SFTP to find the .htaccess file and save a copy of it in case you make a mistake. You can do this by renaming it to something like “.htaccess_old”. Next, you’ll need to make a new .htaccess file. Put the following code into it to establish default settings:
# BEGIN WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
Save the file and try reloading your WordPress site. If this process worked, you can delete the old .htaccess file and keep working with the new one. However, if your host uses an Nginx server, you’ll need to follow a slightly different process. This server type uses a variety of different config files, depending on the hosting provider. Reach out to your host to see which one applies to your situation.
13. Contact your web hosting provider
If you’ve tried all of these methods and you can’t fix the “too many redirects” error, it might be time to get some help. You might be missing a crucial step, or there could be a deeper issue with your WordPress site. By contacting your web hosting provider, you can get fast assistance with the error.
How to prevent the “Too Many Redirects” error in the future
If you want to prevent the “too many redirects” error, there are a few steps you can take within your browser and site.
1. Keep your plugins and WordPress files up to date
Outdated or faulty plugins are some of the leading causes of the “too many redirects” error. You can deactivate any add-ons that may be triggering the issue. However, you can also take preventative steps with your current plugins and theme files. For example, you should update your plugins and WordPress theme frequently. You can tell if the software has a new release because you’ll see an alert in your WordPress dashboard. You can also navigate to Plugins > Installed Plugins.
You can update any plugin by clicking on “update now” or “Enable auto-updates”. However, if you prefer to do the process manually, you should check this page on a regular basis. Doing so will enable you to stay on top of any new releases and bug fixes. Additionally, you can report any faulty plugins if they cause the “too many redirects” error. Find the corresponding plugin support forum and document your issue to see if there is a known solution. Moreover, this action could prompt the plugin developers to fix the problem.
2. Clear out your cache and stored cookies regularly
Clearing out your cache and your saved cookies, prevents your browser or WordPress site from trying to access outdated data. It’s likely that you won’t need to use these methods as most browsers are smart enough to remove outdated cookies and cache items. However, you can streamline the process by using a WordPress plugin to clear your site’s cache. An add-on such as this one can make sure that the most current version of your site is always available to your users.
3. Use a checklist or company for website migrations
Many of the causes for redirect errors in WordPress arise from migrations from HTTP to HTTPS. If you’re not familiar with migrating a site, you may miss some of the essential processes needed to make your website redirect and function correctly. Therefore, use a dedicated migration service to take care of the process. Professionals have experience with every aspect of migrating a site. As such, they’re less likely to make mistakes. If you prefer to do the migration yourself, you might like to use a checklist during the process:
- Prepare for the migration: First, you’ll need to make a copy of your site as a backup. You’ll also need to block access to your new site until you can check it for errors and migrate all your content.
- Create a URL mapping: You’ll need to create a redirect map for all your site’s URLs. Then, you’ll need to update them and create sitemaps so that you can transition the links easily.
- Create backups: Before starting the migration, you’ll probably want to back up all your individual content. Otherwise, you could lose it if something goes wrong during the process.
- Update your DNS settings: You’ll need to change your domain settings so that the URL points to your new address. Usually, your new host can take care of this for you.
- Set up your redirects: This step is crucial because misconfiguring your redirects can trigger the “too many redirects” error. Make sure you test each link to see that it works.
- Send your URLs to Google Search Console: You’ll need to verify your new site and send sitemaps with your new URLs indexed. This process is essential for Search Engine Optimization (SEO).
- Update your links: If other websites link to your site, you might like to ask them to update those URLs. Additionally, you should ensure that any ad campaigns contain the correct links for your new website address.
- Check for problems: Finally, you might like to run a site audit. This process can test all your links and identify any issues.
If you’re migrating to a different server, the process might be slightly different. It pays to do your research before the migration to avoid any errors.
No more redirect loop error
The “too many redirects” error can happen on WordPress when the site gets stuck in a redirection loop. Although the problem can be frustrating, you should be able to solve it pretty quickly. You can usually fix the error by clearing out your cache or cookies. Additionally, there may be solvable issues with your server, third-party platforms, or plugins. Finally, if you still can’t troubleshoot the redirection error, your hosting provider may be able to help you out.