Skip to content
xYnta
Go to websitexynta.com
Search
EN

What does “Too many redirects” mean and how can I fix it?

Updated on

The error message “Too many redirects” means that your website is in a redirect loop: the browser is redirected between addresses again and again, without ever reaching a page. After a number of times the browser stops and shows this message.

Possible causes

  • Incorrectly configured addresses in your website, for example a WordPress address or site address that still starts with http://.
  • Rules in the .htaccess file that contradict each other or create an unintended redirect. You can test your rules with the .htaccess tester.
  • Your control panel sends visitors to https://, while a rule or setting in your website sends them back to http://. Below you can read how to track this down and fix it.
  • A proxy or CDN in front of your website, such as Cloudflare with the SSL mode Flexible. Cloudflare then fetches your website over http://; if your server redirects that to https://, a loop is created, according to Cloudflare's explanation. Cloudflare then recommends the SSL mode Full or higher.
  • Duplicate or incorrect redirect rules in the server settings.
  • Plugins or themes that conflict with each other, in a CMS such as WordPress.

Solution: finding the rule that sends visitors back to http://

Your control panel can send visitors from http:// to https:// itself. If your website then sends them back to http://, a loop is created. A short test shows whether that is the cause. Then you make your website itself send visitors to https://, and you turn the redirect of the control panel back on.

This is how you turn the redirect of the control panel off and on:

Web Hosting (DirectAdmin)

Also for Reseller Hosting.

  1. Log in to DirectAdmin via Single Sign-On from Mijn xYnta, or at https://yourdomain.nl:2222.
  2. Under Account Manager, click Domains.
  3. In the list, click yourdomain.nl. You see Modify yourdomain.nl.
  4. Under SSL, untick or tick Force SSL with https redirect.
  5. Click MODIFY.
Modify Domain in DirectAdmin, with the option Force SSL with https redirect
Domains › Modify Domain

WordPress Hosting (Plesk)

  1. Log in to Plesk at https://whs1.srvnl.nl:8443. You can find your server name in How can I find the server name of my hosting package?
  2. For yourdomain.nl, click the Hosting & DNS tab and then Hosting. You see Hosting Settings.
  3. Under SSL/TLS support, untick or tick Redirect visitors from HTTP to HTTPS via a SEO friendly 301 redirect.
  4. Click Save.
  1. Test: turn the redirect off temporarily

    Untick the option and save, as described above. If the error message has gone, something in your website sends visitors back to http://. If the message stays, the cause is elsewhere: then look at the other causes above and turn the redirect back on.

  2. Send your website to https://

    Find the rule or setting that sends visitors back to http:// and change it to https://, or remove it:

    • a rule in .htaccess, for example a RewriteRule with http://%{HTTP_HOST} in it;
    • the WordPress address and the site address in the general settings of WordPress: make them start with https://.

    A rule in .htaccess that does send visitors to https:// looks like this. Put it at the top of the file. If there is a block # BEGIN WordPress … # END WordPress, put it above that block: WordPress rewrites everything in between.

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  3. Turn the redirect back on

    Tick the option again and save, as described above.

  4. Check your website

    Open http://yourdomain.nl. You now end up at https://yourdomain.nl, without an error message.

Related articles