Support » Fixing WordPress » ERR_TOO_MANY_REDIRECTS

  • Resolved JacobALund


    I’m receiving this message on one of my websites when I try to enter it: ERR_TOO_MANY_REDIRECTS

    My site is

    The strange thing is that when I go to a sub-page such as it works perfectly fine. Also, I can enter the control panel without problems.

    But I just can’t seem to be able to enter the site by it’s front-page. I’m not entirely sure when this issue started to happen, but it might have been in relation to the new version 4.4.1.

    Hope you can help!

Viewing 15 replies - 31 through 45 (of 60 total)
  • I tried that and it did not help to deactivate all plugins. Only have Yoast, formidable, and responsive menu plugins on this website that is the simplest of websites we have that is included in this issue:

    Moderator Marius L. J.


    All right, we might’ve narrowed it down to a server configuration thing, so far had success with a new pluggable core function for rewrites.

    But first, let’s try the simple solution!

    Are you using any kind of services such as CloudFlare or similar for your sites? If so, please try disabling these to make sure they aren’t causing any complications

    If the above fails, you can try the below solution.

    Please add the following code to the end of your themes functions.php file, a plugin or whatever you feel comfortable with:

    if ( ! function_exists( 'wp_redirect' ) ) :
    function wp_redirect($location, $status = 302) {
        global $is_IIS;
         * Filter the redirect location.
         * @since 2.1.0
         * @param string $location The path to redirect to.
         * @param int    $status   Status code to use.
        $location = apply_filters( 'wp_redirect', $location, $status );
         * Filter the redirect status code.
         * @since 2.3.0
         * @param int    $status   Status code to use.
         * @param string $location The path to redirect to.
        $status = apply_filters( 'wp_redirect_status', $status, $location );
        if ( ! $location )
            return false;
        $location = wp_sanitize_redirect($location);
        header("Location: $location", true, $status);
        return true;

    This is essentially the same function core uses, but we’ve removed a call to status_header() from it.

    I’m not guaranteeing this is it, but tested sites are as mentioned showing this as functional.

    When you disable ModSecurity in CPANEL, it solves the issue. Some say you have to disable rules #214620 & #214940 server side.

    Moderator Marius L. J.



    It affects front page redirects ?

    These are the rules mentioned for the wp-admin returning a 403/404 so I’d like to know if they are related in any way.

    I have 12 sites. Only 1 has the redirect problem. Switching permalinks from Post Name to Plain has allowed the site to work.

    The affected site is in a folder below another site, set up essentially the same.

    The site in the root folder works fine with the permalinks still set to Post Name. They are on GoDaddy.

    The only difference I see is that the affected one is in a sub-folder.

    I do have other sites on sub-folders, but they are on HostMonster and are unaffected by the redirect problem.

    @mike: What I can gather is that it might be a host specific problem on your side. Could you possibly find out what versions of PHP your server is running. I can only assume wordpress might have been updated to support some newer version of PHP which is not commonly deployed yet, as most servers are always using old versions of php.

    On my site, it’s specifically only an issue if the following are all true:

    • Static Front Page enabled.
    • Permalinks set to something pretty
    • 4.4.1 installed

    This is on a new latest Apache server running Ubuntu. No caching plugins installed, no CDN in the mix (like Cloudflare) and all plugins disabled.

    I have not had a chance to try the status_header() fix yet.


    Looks like unchecking the relative links box worked.

    Curious — I posted a response to Adrian, and now the response has disappeared !?

    Adrian – you are looking into PHP versions. Mine on the affected site is 5.

    One of my sites on that account is affected by the redirects problem and the other is not. I don’t know what has made the difference between the two, except than the affected one being in a sub-folder,

    Anyway, for your evaluation purposes, PHP 5 in this case.

    @marius, it solves the problem of the ERR_TOO_MANY_REDIRECTS when you login.

    The issue for me was an error for too many redirects only on my homepage. The solution I found was: go to Settings>Permalinks> then make sure everything is in lowercase.

    Moderator Marius L. J.


    As we try to cover the issue if something is way unrelated to the topic at hand we may at times moderate them to help keep the topic sane and on track and not create confusion, that appears to have happened in this case

    But not for the front page redirect loop which is what we are trying to nip in the butt here? 🙂

    I’ve not heard if anyone tried the potential fix mentioned in though, would love to know if anyone who was experiencing the problems tried the solution and it fixed things for them? (if not it’s back to the drawing board, but we’re kind of in limbo awaiting feedback to make sure we don’t hunt ghosts after finding a solution, unfortunately I’ve been unable to reproduce the problem so checking what is causing it heavily relies on affected users feedback)

    I will test the proposed change this evening and report back.




    @marius, I’ve just tested the code by placing it in the functions.php file for an affected site (like other commenters, just one of my sites was affected). It did not solve the problem for me.

    To list out what others have said –

    Apparent Causes:

    • Permalinks set to something other than the default (mine is /%category%/%postname%/)
    • Static home page


    • “Too Many Redirects” error on home page (other pages and posts work, even through their permalinks)

    Changing either of the settings in the “Apparent Causes” list fixes the problem for me, although obviously it’s a temporary solution since that’s how I want my links.

    I’ve also tried removing all of the plugins to see if any of them were the issue, but it didn’t help. I may have to downgrade to 4.4.0 tonight if I can’t find a solution, but I’m happy to try different suggestions on my site in the mean time.

    A suggestion in a different forum thread said to change your permalinks to the default, delete your .htaccess file, then change it back, allowing WordPress to recreate the .htaccess file. Unfortunately, this did not work for me either – other than a line break at the beginning of the file, the newly generated file was identical to the old file, and did not solve the issue.

    Moderator Jan Dembowski


    Forum Moderator and Brute Squad

    Hi @questions4wordpress Can you do me a favor? I’d like to see if I can replicate the conditions on my test setup but I’d like some more info.

    Unfortunately, this did not work for me either – other than a line break at the beginning of the file, the newly generated file was identical to the old file, and did not solve the issue.

    I have 2 test instances, one running Apache2 and the other running nginx. It sounds like you’ve Apache2, can you share the details of your installation?

    Ideally can you install this plugin?

    That can generate a dump of your system details. For example, my test box has this.

    Which I’m sharing to be complete and forthright. 😉

    That test box has this in the .htaccess file.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wordpress/index.php [L]

    There’s no .htaccess file in the root.

    The Apache2 configuration has these lines.

    <Directory /var/www/html>
                    # Options Indexes FollowSymLinks MultiViews
                    Options -Indexes
                    AllowOverride All
                    Order allow,deny
                    allow from all

    Not terribly exciting either.

    If the volunteers here can get some of those details from you or @jacobalund then it maybe this problem can be reproduced and that will help sort it out.

Viewing 15 replies - 31 through 45 (of 60 total)
  • The topic ‘ERR_TOO_MANY_REDIRECTS’ is closed to new replies.