Too many redirect with version 5.2.1

Your software
My Mautic version is: 5.2.1
My PHP version is: 8.1.31
My Database type and version is: mysql 8.0.41
Installation though coolify

Your problem
My problem is: Too many redirect when accessing the website

I tried to update the url (site_url in local.php)

then, I had a lot of too many redirect. I removed the cache and restarted.

I’ve reverted to the url in local.php but the problem remains.

I have indeed an endless loop


curl -I -L https://***.***.com/

HTTP/2 301

**date**: Tue, 08 Apr 2025 14:53:39 GMT

**content-type**: text/html; charset=utf-8

**location**: https://***.****.com/

**alt-svc**: h3=":443"; ma=86400

**cache-control**: max-age=0, must-revalidate, private

**expires**: Tue, 08 Apr 2025 14:53:39 GMT

**server**: cloudflare

**x-powered-by**: PHP/8.1.32

**cf-cache-status**: DYNAMIC

**cf-ray**: 92d2986eaa95eb8d-NRT

HTTP/2 301

**date**: Tue, 08 Apr 2025 14:53:40 GMT

**content-type**: text/html; charset=utf-8

**location**: https://****.****.com/

**alt-svc**: h3=":443"; ma=86400

**cache-control**: max-age=0, must-revalidate, private

**expires**: Tue, 08 Apr 2025 14:53:40 GMT

**x-powered-by**: PHP/8.1.32

**cf-cache-status**: DYNAMIC

**report-to**: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=CuzKFKavmYQx5HJb7Ecb4gr07OB7T0Jx8y8mHLcKUICAf0JYg0HsLf%2BqHRo%2BK6ZfGdQexqnlkIfnqr%2Fl6gaqHE0c4RsxGQ7nZVSfNbTpbZfVxq%2FAdCuItszMX5r9K5sFyCkeQnQ%3D"}],"group":"cf-nel","max_age":604800}

**nel**: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}

**server**: cloudflare

**cf-ray**: 92d2987439aeeb8d-NRT

**server-timing**: cfL4;desc="?proto=TCP&rtt=9740&min_rtt=7371&rtt_var=3132&sent=9&recv=12&lost=0&retrans=0&sent_bytes=3144&recv_bytes=615&delivery_rate=570614&cwnd=252&unsent_bytes=0&cid=bab74744903b138b&ts=1207&x=0"

did you clear the cache?
Run this PHP command: php /var/www/html/bin/console cache:clear .

Clearing the cache is a good first step, but if the redirect loop continues, I’d check the HTTPS and proxy configuration next. Since you’re using Coolify with Cloudflare, Mautic may not be detecting the original HTTPS request correctly, especially if SSL is terminated at the proxy.

Make sure the public URL in Mautic’s local.php matches the exact domain you’re accessing, including the correct https:// scheme. Also check Cloudflare’s SSL/TLS mode and confirm that the reverse proxy is forwarding the original protocol correctly (for example, through X-Forwarded-Proto: https).

I’d also inspect the redirect chain with curl -I -L or Redirect Checker to see whether the repeated 301 is coming from Mautic, the proxy, or Cloudflare. That should help narrow down the cause before making further configuration changes.