Troubleshooting a Redirect Loop

Introduction

A redirect loop occurs when a website tells your browser to redirect to a page, which in turn tells your browser to redirect to another page, this happens over and over again until your browser stops redirecting and declares that a redirect loop has occurred. This varies from browser to browser, but is generally around 21 redirects.

Such a situation is typically caused by a misconfiguration of the website or the server.

Checking WHMCS Configuration

Ensure that the WHMCS System URL setting uses the correct URL for your website.

For help to check the system URL and update it, see Updating the System URL.

If the issue persists, continue to the next section.

Checking mod_rewrite Rules .htaccess

Redirect loops can be caused by .htaccess files which make use of an Apache mod called mod_rewrite. This is most commonly used for redirecting pages, creating human and search-engine-friendly URLs, and forcing pages to be loaded over a different protocol.

1. Reset the .htaccess file contents in your WHMCS directory.

For step-by-step instructions doing this, refer to this guide.

2. Navigate up the directory tree from the WHMCS directory and temporarily remove any other .htaccess files:

Remove .htaccess files

If the issue persists, continue to the next section.

Cloudflare SSL

If your website is protected by a Cloudflare SSL certificate, certain settings have been known to cause redirect loops in WHMCS. To resolve:

1. Login to your Cloudflare account

2. Click the Crypto heading

3. Change the SSL setting to Full or Full (Strict)

The issue should now be resolved.