Troubleshoot Cloudflare Cache Problems with Logins, Cookies and Forms
What should a small business check when logins, forms or personalised pages break after a Cloudflare caching change?
If dynamic behaviour changed after a Cloudflare cache update, narrow or disable the suspected rule, then check whether it forced an Edge TTL where the origin should control caching. Review whether the response sets or depends on a cookie. Confirm the rule's actual match scope, including accidental matches on /cdn-cgi/*, and retest the affected login, form or transaction from a clean session before restoring broader caching.
Contain the suspected rule before adding exceptions
Cloudflare advises removing an Edge TTL override that forces a page to be cached when the origin must control caching. If the failure followed a cache change, narrow or disable the suspected rule first when it could be forcing caching for the affected response. Record the affected route, observed symptom, test time and rule state before making another change, so the recovery decision remains explainable.
Sources: Dynamic content and login issues · Cloudflare Cache (CDN) docs.
- Reduce the suspected change before adding exceptions.
- Capture one reproducible customer or staff journey.
- Keep a clear reversal decision.
Check the response’s cookie behaviour
Cloudflare documents a configuration in which it can cache a response and remove the Set-Cookie header before storing that response at the edge. Check whether the affected login, account, form or transaction response sets or depends on a cookie, and compare observed session behaviour with the expected journey. Do not conclude that cookies are the cause solely because the symptom followed a caching change; use the clean retest to check whether containing the rule restores expected behaviour.
Sources: Dynamic content and login issues · Cloudflare Cache (CDN) docs.
- Check whether the response sets a cookie.
- Check whether the journey relies on session state.
- Treat cookie review as an investigation step, not proof of cause.
Confirm what the rule actually matches
Cloudflare advises checking during debugging that rules are not matching Cloudflare-generated paths such as /cdn-cgi/*. Cloudflare says Cache Rules adjust cache eligibility, duration and location for matching requests. Compare the affected request with the rule’s intended scope, then test an intended route and an excluded route separately before changing the expression.
Sources: Dynamic content and login issues · Cloudflare Cache (CDN) docs; Cache Rules · Cloudflare Cache (CDN) docs.
Use the nameserver troubleshooting guide’s evidence-first recovery approach if the symptom may involve a wider Cloudflare or DNS change rather than caching alone.
- Compare rule scope with the actual request.
- Check for unintended generated-path matches.
- Separate a caching symptom from a wider DNS or Cloudflare change.
Retest one complete business journey
After containing the suspected rule, start a clean session and run one affected journey from its first step through to the expected business outcome. For a form, record whether submission, storage and owner notification each occur; for a login or transaction, record the first step that does not behave as expected.
Use the enquiry guide to test submission, storage and owner notification rather than treating a successful page load as proof that a form works. Confirm Cloudflare’s current prerequisites in its documentation before restoring or replacing a service-affecting rule, and retain a clear reversal path.
- Use a clean session.
- Test the full journey, not only a page load.
- Record the first missing business outcome before broadening caching.
Containment and retest runbook
Use this runbook after a login, form or personalised journey changes following a Cloudflare caching update. Work through one reproducible journey at a time rather than changing several rules at once.
| Symptom or observation | Containment action | What to inspect | Retest outcome |
|---|---|---|---|
| Dynamic journey changed after a cache update | Narrow or disable the suspected forced caching rule | Whether Edge TTL forces caching where the origin should control it | The affected journey returns its expected result |
| Login or personalised state fails | Contain the suspected rule before adding exceptions | Whether the response sets or depends on cookies | A clean session retains the expected state |
| Unexpected route seems affected | Keep the rule narrow while reviewing scope | Whether the rule matches intended requests or /cdn-cgi/* | Intended and excluded routes behave as planned |
| Form page appears normal but outcome is uncertain | Do not broaden caching yet | Submission, storage and owner notification | The complete form journey produces every expected outcome |
This runbook does not prove that caching caused the symptom. Confirm current Cloudflare requirements before service-affecting changes, retain a reversal path, and investigate wider DNS or origin changes when the evidence points beyond the suspected rule.
When this is not the right approach: Do not use this runbook to assume Cloudflare caching caused every login or form failure. If the issue predates the cache change or points to a wider DNS, origin or application problem, investigate that boundary instead.
Related guidance
What follow-up questions matter most?
- What should I do first after a dynamic page breaks?
- First narrow or disable the suspected rule when it may be forcing caching where the origin should control the response. Avoid adding more exceptions before identifying the actual route and behaviour involved.
- Can cache behaviour affect a login cookie?
- Cloudflare documents a configuration in which it can remove Set-Cookie before storing a cached response at the edge. Check whether the affected journey sets or depends on a cookie, but do not assume this is the cause until you test it.
- How do I check for an unintended cache-rule match?
- Review the rule expression against the actual request and check whether it catches an unintended path, including Cloudflare-generated paths such as /cdn-cgi/*. Test the intended and excluded routes separately.
What steps does this workflow follow?
How to troubleshoot a Cloudflare caching problem
- Contain the change: Narrow or disable the suspected cache rule when it may be forcing caching for a response the origin should control.
- Identify the affected journey: Write down the exact login, form, account or transaction journey that shows the problem and begin with one reproducible symptom.
- Inspect cookies: Check whether the affected response sets or depends on cookies and whether the observed failure involves session or personalised state.
- Confirm the rule match: Compare the intended route with the rule scope and inspect whether generated paths or other unintended requests match.
- Retest cleanly: Use a clean session and run the complete journey from its first step to the required business outcome.
- Record and decide: Record the first missing outcome, rule state and result, then broaden caching only after expected behaviour returns.