Quick Solution: Too Many Redirects Error in WordPress

The "too many redirects" error in WordPress is a common problem that can frustrate website administrators. This error occurs when a web browser tries to access a URL that redirects to another URL continuously, creating an infinite loop. The following explains the most common causes of this problem and the appropriate solutions to resolve it.

What causes the error of too many redirects?

Several reasons can cause the redirects error in WordPress:

  • Incorrect URL settingsIf the WordPress and site URLs are configured incorrectly, this can generate a loop.
  • Cache pluginsSome cache plugins may interfere with redirection settings.
  • Redirection pluginsIf you have plugins that handle redirects, a wrong configuration can result in redirection loops.
  • SSL CertificatesSSL configuration problems can cause unwanted redirects from HTTP to HTTPS.

Verify URL configuration

One of the first things you should check is the URL settings in your WordPress admin. To do this:

Step 1: Accessing WordPress settings

Log in to your WordPress administration panel and go to Settings > General.

Step 2: Check URLs

Make sure that the addresses of WordPress URL y Site URL are correct and that there are no discrepancies. For example:

http://tusitio.com
https://tusitio.com

If one of these options is set to HTTP and the other to HTTPS, this may cause the error.

Deactivate conflicting plugins

Plugins can be a frequent source of redirection problems. To identify if a plugin is causing the error:

Step 1: Deactivate all plugins

Go to Plugins in your administration panel and deactivate all plugins.

Step 2: Activate one by one

Activate each plugin one by one and check if the error reappears. This will help you identify which one is causing the problem.

Review the .
Quick Solution: Too Many Redirects Error in WordPress
Download our web maintenance guide Free of charge!
Free guide for freelancers and small businesses that want to avoid surprises and improve their web performance.
htaccess

The .htaccess file is crucial in the configuration of redirects. An error in this file can cause multiple redirects. To check it:

Step 1: Access the .htaccess file

Use an FTP client or your hosting's file manager to access the .htaccess file located at the root of your WordPress installation.

Step 2: Make a backup copy

Before making changes, it is advisable to make a backup copy of the original file.

Step 3: Edit the file

Look for lines that contain unnecessary redirects. A basic .htaccess file for WordPress should look something like this:

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

Eliminate any additional redirection that is not necessary.

Check SSL configuration

If your site has SSL enabled, make sure the configuration is correct. A common problem is having HTTP to HTTPS redirects without a properly configured SSL certificate.

Step 1: Verify the SSL certificate

It uses tools such as SSL Labs to check the validity of your SSL certificate.

Step 2: Proper configuration in WordPress

Make sure that all URLs are using HTTPS. You can do this by editing the settings in Settings > General.

Final considerations

The error of too many redirects can be frustrating, but with careful analysis and a few troubleshooting steps, it is possible to resolve it without complications. Always be sure to make backups before making significant changes to avoid data loss.