Too many redirects error (ERR_TOO_MANY_REDIRECTS) is one of the common errors that appear when you use WordPress. This error appears due to incorrect settings in WordPress, a plugin, or a theme.
The error occurs when the server cannot connect to your site, usually due to a Redirect Loop, which occurs when your site causes too many redirects to itself.
In this article, we’ll show you the common reasons why this error occurs and how to fix them on WordPress sites step by step.
سبب (TOO_MANY_REDIRECTS)
This error occurs because you are trying to access a page that has been moved or deleted from your website or an external link on the web. The URL may have changed, or the theme may not be compatible with a number of plugins,
The error display varies from one browser to another for example, in Google Chrome it is usually displayed as (ERR_TOO_MANY_REDIRECTS) or (This web page contains a redirect loop). There are several options available to help us solve this problem.
Solve the problem (TOO_MANY_REDIRECTS)
There are several different methods that we will learn about in this article to fix the error (ERR_TOO_MANY_REDIRECTS). We recommend trying each one individually to find the cause of the problem and follow the steps in the explanation to work around the problem.
1. Refresh the browser page
One of the simplest and easiest solutions to follow is to refresh the browser page. Refreshing the browser page revisits the URL and downloads a fresh copy of the page, overriding any stored data and displaying the latest information available for the WordPress website. You can try this method first because it is fast, and you will also know immediately whether the issue is resolved or not.
You can use the following keyboard shortcuts to refresh the page 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
2. Delete cookies and browser cache
Sometimes browser data stores corrupted cookies and outdated cache, causing the ERR_TOO_MANY_REDIRECTS error. So, before you review and change the settings of your WordPress website, make sure to clean the corrupted browser data by deleting your browser history.
Here are the steps to follow to delete browser cache and cookies:
Open your web browser and go to Menu (top left) > History. Then delete all cookies, cache and browsing history.
Click on the “ Tools ” menu in your browser. In some browsers, it may be called “ Options ”.
Click this option to open a drop-down menu. Select the “ Privacy ” or “Delete Cookies ” option from this drop-down menu.
Make sure you select all the cookies you want to delete, then click the button that allows you to clear them all at once or individually by clicking each one.
You can follow these methods depending on the type of browser used. You can choose between erasing all or some of the data. Make sure to select Clear all data.
3. Clear WordPress cache
WordPress cache is a feature that stores information from your web pages. The cache, which you can clear manually if necessary, saves images and other components of the web page so that they can load faster when visitors visit.
If you’re experiencing this issue with your WordPress site, clearing the cache is a good first step. This clears files stored in your computer’s memory and can significantly speed up your site’s loading speed.
You can clear the cache using a dedicated caching plugin. For example, you can use WP Super Cache.
Once you clear your cache, try reloading your site. If that doesn’t work, you may need to try another method.
Read also: Learn about the importance of enabling cache in WordPress
4. Review plugins
Plugins do a great job on your site and can add amazing functionality to your website. But sometimes additional components can cause problems such as (ERR_TOO_MANY_REDIRECTS).
Before the problem started, did you add a new plugin? If yes:
- Log in to your WordPress site
- Choose Add-ons, and then Office Add-ons
- Select the component you added, and then disable it
- Refresh the page
If you cannot access your WordPress dashboard due to a redirection error, you will need to access your plugin files via using a File Transfer Protocol (FTP) such as FileZilla. Where you can deactivate WordPress plugins.
Read: Explaining FTP for beginners, and how to use it to manage your site files
5. Change the WordPress template
It is difficult for this problem to appear because of the theme, but you can resort to this simple solution by disabling the current theme and activating a new one.
- From the side menu within your WordPress dashboard, click Appearance >> Templates >> Add New.
Choose a new template, then click ( Install) then (Activate).
Test the site, and if the problem is resolved, you can use this list to choose a new template
6. Review the site’s URL settings
If you have recently made some modifications to the website URL it may cause the redirection error, so you should make sure that you do not make any modifications to the URL.
- Log in to WordPress.
- Choose Settings, then General.
- Check your WordPress URL and your site’s URL to make sure they match.
For example, if your site URL is set to:
http://www.yourname.com
The site address URL is set to:
https://yourname.com
This may cause a redirect as the two are different, and you can update it through the wp-config file. php. Where you can access your site using FTP and then specify the wp-config. php and open it in a text editor.
Add these two lines to your wp-config. php, where “yourname” is the correct domain name for your site.
- حدد (‘WP_HOME’، ‘http://yourname.com’)
- حدد (‘WP_SITEURL’ ، ‘http://yourname.com’)
7. Review domain name settings
It is very important that the domain name on the hosting site matches the domain name associated with your site. If it doesn’t match, people won’t be able to find your site, and the Too Many Redirects (ERR_TOO_MANY_REDIRECTS) error appears.
For example, if the domain name for your site is set to:
yourname.com
The domain name for the site was set to:
www.yourname.com
This may cause a redirection because the two are different, and you can review the domain name settings through cPanel
1. Log in to your hosting control panel.
2. Open cPanel.
3. Choose Domain.
4. Make sure that the domain name is correctly linked.
Read also: How to link a domain to hosting, and make the settings correctly
8. Review the .htaccess file.
If you are receiving an ERR_TOO_MANY_REDIRECTS error on your WordPress site, you can try resetting .htaccess to fix it. Here’s how:
1. Log in to your cPanel control panel.
2. Go to File Manager.
3. Choose public_html
4. Select the .htaccess file
5. Click Edit
6. Replace it with this code
7. Save, and then refresh the page
Read also: Full explanation of htaccess. File functions, uses, and most important modifications
9. Scan your site
If you want to know the exact cause of the problem, you can scan your site through the httpstatus website . This free scan enables you to enter the URLs of your site, and it shows you errors and problems associated with your site for you to work on solving them.
10. Make sure the SSL certificate is activated correctly
If you activate the SSL certificate incorrectly, it can cause problems such as a large number of redirects. You can check whether they are installed correctly or not using a tool like Qualys SSL Server Test .
This tool checks your site’s domain name to find any problems related to activating the SSL certificate.
10. HTTPS checking on the site
If you have switched your site from HTTP to HTTPS, you will need to redirect all of your links. You can use a plugin that can change these links automatically. For example, you can use the Better Find and Replace plugin .
11. Check redirects on your server
After checking for HTTPS redirects. However, there may be a misconfigured 301 redirect error, which may point to the original link of your site, which may cause the Too Many Redirects error to appear.
1. Log in to your cPanel control panel
2. Go to File Manager
3. Choose public_html
4. Select the .htaccess file.
5. Click Edit
6. Replace it with this code
7. Save, and then refresh the page.
How to prevent an error (ERR_TOO_MANY_REDIRECTS) from occurring
We hope these above steps fixed this error for you. If this error isn’t fixed, you may need to talk to your hosting company to make sure it’s not due to a problem with their server.
If the issue is resolved with one of these steps, there are some other steps you can take to avoid this error from occurring in the future. Let’s look at some different methods.
1. Keep your plugins and WordPress versions up to date
If you do not maintain regular updates of plugins and WordPress files such as theme, it may cause some problems in your site.
For example, you can see if your site’s plugins and theme are on a new version or not in your WordPress dashboard.
You can ensure this by ensuring that all your plugins, templates, and copies of WordPress are updated with the latest version .
2. Clear the cache
We’ve already explained how to clear your cache and saved cookies, but keep doing this step regularly to clear any old data on your site.
You can simplify the process by using a plugin like WP Super Cach to clear your site’s cache.
If you want to remove cached files manually:
1. Open the WP Super Cache plugin.
2. Choose Easy.
3. Click on Delet Cache.
You can also go to the Advanced tab and scroll down to Expiry Time & Garbage Collection. Here, you can control how long cached files remain active on your site.
In the end, as you followed us in that article, we talked about the meaning of the error of a large number of redirects (ERR_TOO_MANY_REDIRECTS), as well as the reason for the appearance of this error, and how to prevent this error from occurring in the future. The most important additions that you can use in your journey are to protect your site from any problems.
Leave a Reply