"Too Many Redirects" on Assets (Images, CSS, JS)

What is the name of the domain?

What is the error message?

To many Redirects

What is the issue you’re encountering

We are encountering a “Too Many Redirects” error across various static assets, including images, CSS files, and JavaScript files. This issue is causing significant disruptions to our website’s functionality and appearance.

What steps have you taken to resolve the issue?

Troubleshooting Steps Taken:

We attempted to switch the SSL settings from Full to Full (Strict) on our CDN or server configuration, but this did not resolve the issue.
A similar issue occurred last week (on January 9th), and while it seemed to resolve temporarily, it has resurfaced and persisted for an entire week.

What are the steps to reproduce the issue?

Just browse trhoutgh the site. You will either see images that are not getting loaded, then you click on f12 to see the error.

Screenshot of the error

I’ve done just that: I’ve browsed through the site.

But I don’t see any “too many redirects” errors on any site assets.

Is there any particular URL I should look at?

Or is the issue resolved now?

I am having the same issue on a worker with static assets setup - reported it on Cloudflare Discord here:

The strange thing is that it happens only occasionally but can last for minutes. When a chunk of JS, the main CSS file or a font doesn’t load, that is obviously pretty bad (as in page breaks completely).

Most times there are no redirects - sometimes there are 1 - other times so many that Chrome stops loading the asset (ERR_TOO_MANY_REDIRECTS)

Example from today here:

The issue is not resolved. You just have to send enough requests. It’s a cloudflare-related bug affecting multiple customers including me.

If you keep refreshing and browsing the site eventually you hit it. It occurs 1-5% of the time.

1 Like

I’m hitting an identical issue since 2 weeks ago.

Hi,

someone from Cloudflare has just confirmed this is a bug and they are now working on fixing it.

Thanks for the report.

1 Like

What is the name of the domain?

.riseapp.co.za,.appointmentguru.co

What is the error message?

ERR_TOO_MANY_REDIRECTS

What is the issue you’re encountering

Scripts are caught in a redirect loop, causing javascript websites to fail - the issue seems to be intermittent

What steps have you taken to resolve the issue?

Turning off Cloudflare’s proxy resolves the issue (but then you don’t get the benefits)
I am testing if turning off Speed Brain might resolve the issue

What are the steps to reproduce the issue?

Proxy your DNS through Cloudflare.
This issue is affecting multiple Cloudflare domains and accounts - this issue is effecting sites to white no changes have been made in a long time.
If you make a CURL request to one of the resources that has the infinite loop, you can see that Cloudflare is 301 redirecting to the same url with a % attached at the end (see screenshot)

Screenshot of the error

1 Like

Make sure that your SSL/TLS encryption mode is set to Full (Strict):

https://dash.cloudflare.com/?to=/:account/:zone/ssl-tls

I don’t think it’s that. We’ve made no changes to that setting in years.
In addition, if you look at the redirect from the screenshot above, you’ll see that the original request is already https.

An example of the request is:
location: https://next-projects.riseapp.co.za/assets/VTooltip-CydViUv6.css

An example of the request redirect is:
location: https://next-projects.riseapp.co.za/assets/VTooltip-CydViUv6.css
Redirecting to Projects | RiseApp

notice how it is adding the % to the end?

Headers indicate the response is from Netlify (X-Nf-Request-Id) so check there for the problem if SSL/TLS is “Full (strict)”…

curl -i https://next-projects.riseapp.co.za/assets/VTooltip-CydViUv6.css
HTTP/2 301
date: Wed, 22 Jan 2025 18:27:31 GMT
content-type: text/plain; charset=utf-8
content-length: 79
location: https://next-projects.riseapp.co.za/assets/VTooltip-CydViUv6.css
x-nf-request-id: 01JJ7M4WM8DYDZR72N3F2NW42S
cache-control: max-age=1800
cf-cache-status: HIT
age: 167
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=C8JmnV6cf9Z7BJFFcKIaDAGKqbSiHPpsPdklrdIWh3cE7TSl0LbAh4VcYJlwz3eBLONpv5gi3y8OpU04ZPAioghrTOjxXgxEoIRtQ8mfT0NGoF85tZ3Q4gY55U68omR7A309tEQ3MCcvbBO5rlfVbVcavSnYfK6sz60%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 90619937b95693ff-LHR
alt-svc: h3=":443"; ma=86400
server-timing: cfL4;desc="?proto=TCP&rtt=0&min_rtt=0&rtt_var=0&sent=0&recv=0&lost=0&retrans=0&sent_bytes=0&recv_bytes=0&delivery_rate=0&cwnd=0&unsent_bytes=0&cid=56ff5e0d42fa26d9&ts=71&x=0"

Redirecting to https://next-projects.riseapp.co.za/assets/VTooltip-CydViUv6.css%

Make sure it is “Full (strict)” so requests are secured and made using the same protocol to the origin as the client requested.

Hmm … good point. the nf header implies that it is reaching Netlify.
Perhaps it’s something between the two. But the fact that turning off Cloudflare’s proxy resolves the issue makes me suspect that the error is on Cloudflare somewhere.

What is the name of the domain?

https://qidian-vp.com/

What is the error number?

301

What is the error message?

Failed to load resource: net::ERR_TOO_MANY_REDIRECTS

What is the issue you’re encountering

some client will get 301 Failed to load resource: net::ERR_TOO_MANY_REDIRECTS for api get request

What steps have you taken to resolve the issue?

  • Update rules related to cache
  • Add page rules

What are the steps to reproduce the issue?

  • just access the site
  • switch to another tab
  • back to site tab → you will see get session request get this error

Screenshot of the error


this is the request error

This problem only happens with some clients and some times.

I just set them few minutes ago, do I need to wait or clear cache in my browser to take the effect?

I don’t see the issue anymore :thinking:

Before moving to Cloudflare, was your domain working over HTTPS connection? :thinking:

May I ask what SSL option have you got selected under the SSL/TLS tab at Cloudflare dashboard for your domain ( Flexible, Full, Full Strict … )? :thinking:

To understand which SSL encryption mode you should select depending on the setup and your origin SSL certificate (if you have got any, or even invalid one?), please use below article for more information:

  • the problem doesn’t happen when you just load the page, it happens with requests to /api, it only causes problems if you login, and need to check console, network to find out

  • I switched to cloudflare a few months ago, the cache problem just appeared recently (I haven’t changed anything in config for months)

  • SSL is in Full state


additional infor, I have some redirect info was set many times ago and still work normally

This is a legitimate cloudflare bug that was introduced roughly 2 weeks ago.

I’ve only found references to it on the internet here:

I am surprised that Cloudflare has not yet addressed this problem, as it has been actively disrupting my websites and appears to be worsening each day.

1 Like