Magento has a redirect loop

Magento has a redirect loop

July 21, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento has a redirect loop

Solving Magento Redirect Loop Issues: A Developer’s Guide

If you’re experiencing a redirect loop error on your Magento website homepage, don’t panic—we’ve got you covered. This issue is usually caused by incorrect base URL settings or conflicts between the Magento core and third-party extensions.

Understanding the Error Message

The “too many redirects” error message indicates that Magento is caught in an infinite loop of redirection requests. It’s trying to fetch your homepage from a previously configured domain (presumably the old server URL), but it keeps getting redirected back, creating an endless cycle.

Step 1: Check Your Base URLs

Open your web browser and navigate to your Magento admin panel (www.yourdomain.com/admin). Log in using your credentials.

Once logged in, follow these steps:

  1. On the left sidebar menu, hover over “Stores” and click on it.
  2. Select “Configuration” from the submenu that appears.
  3. In the tree view on the right side of the page, expand the “General” category.
  4. Click on “Web”.

Here, you’ll find two important fields: “Base URL (Secure)” and “Base URL (Unsecure)”. Make sure these values are set to your current domain.

For example, if your domain is https://www.yourdomain.com, both URLs should look like this:

  • Base URL (Secure): https://www.yourdomain.com
  • Base URL (Unsecure): http://www.yourdomain.com

If you see any discrepancies or old server URLs here, update them immediately.

Step 2: Flush Magento Cache

A cached version of your site might be causing the redirect loop. To flush the cache:

  1. In the admin panel, go to “System” > “Cache Management”.
  2. Select the checkbox for all enabled cache types.
  3. Click on the “Flush Magento Cache” button at the top right corner.

Step 3: Review Your .htaccess File

The .htaccess file is a critical component of your site’s URL rewriting and redirection logic. Open this file and look for any redirect rules that might be conflicting with your current domain or causing a loop.

If you find any references to the old server domain, update them accordingly.

Step 4: Check Your Third-Party Extensions

Sometimes, third-party extensions can interfere with Magento’s URL rewriting process. If you recently installed new extensions or updated existing ones, they might be causing the issue.

Review your extensions and ensure they are compatible with your current version of Magento.

Conclusion: Resolving the Redirect Loop Issue

When faced with a redirect loop error in Magento, it’s essential to systematically check each potential cause:

  1. Verify that your base URLs in the admin panel match your current domain.
  2. Flush the cache to ensure no outdated data is causing conflicts.
  3. Inspect your .htaccess file for any conflicting redirection rules.
  4. Review your third-party extensions and update or disable them if necessary.

Remember, always backup your database before making significant changes. If you’re unsure about any steps, consult with a Magento developer or reach out to the support team at Laravel Company.

By following these guidelines, you should be able to resolve your redirect loop issue and get your Magento site back up and running smoothly.

Catalog Cache Extensions Themes

Our network