Categories
guides troubleshooting

Too Many Redirects error on WordPress Site

Yesterday, a site I was helping with had an issue where requests were erroring out with a browser message saying there were too many redirects or an infinite redirect loop. The site had been working for months, and no one could recall making any changes to the site since the last known working state.

The TL;DR and reason I’m writing this is give myself a quick list to check in future:

  1. Rename .htaccess file to confirm no issues there
  2. Rename plugins folder to confirm no plugin issues.
  3. Rename themes folder to confirm no theme issues.
  4. Check in wp-config.php or in db _options table to verify correct site URLs
  5. Create a test HTML file and test navigating directly to it
  6. Create a test PHP file and test navigating directly to it
  7. Try to recall subpages that existed on the site, and navigate directly to them

In my case yesterday, I tried 1-6 above, and then figured it might be a cacheing problem. I turned off all the caching I could find on my host, and still didn’t get any change.

I connected with their chat support, and their first thought was that I had the wrong IP configured in DNS. Even though it had been working, I updated the IP address and waited for that to propagate, but still no change. Then we restored db and files from 2-week old backups, but still no change.

Eventually, chat support escalated the issue, and around the same time I tried #7 above, and noticed subpages worked. So I logged in to the WP dashboard and changed the site homepage to a different page, saved, and then changed the homepage back to the correct homepage and saved again.

Either that worked, or the escalated tech support made a change at the same time the fixed the issue.

By bo.

I'm @boyEatsSteak in a lot of places. I have been wanting 🍕 for weeks. I like gadgets and technology and keeping notes and tips for my future self since all I can remember is that I forget things.