Cloudflare Troubleshooting
An evidence-driven playbook that queries the Cloudflare API to diagnose redirect loops, SSL errors, DNS problems, and origin failures instead of guessing.
Web & APIIntermediate★ 1,519⑂ 235AI score 9/10Last updated: Nov 8, 2026
What it does
- Diagnoses
ERR_TOO_MANY_REDIRECTS, SSL errors (525/526), DNS resolution failures, and 502/503/504 origin errors by inspecting the real configuration via API. - Gives a concrete workflow: resolve the zone ID → query related settings (SSL mode, Always Use HTTPS, Page Rules, DNS records, DNSSEC, firewall rules) → determine root cause → apply a minimal PATCH fix → re-verify.
- Pushes external cross-checks with
dig,curl, andopenssl s_clientrather than trusting the dashboard alone. - Branches to bundled reference docs for Pages custom domains/DNSSEC migration, Email Routing, SSL modes, and common issue patterns.
Who it's for
- Web developers, infra/DevOps engineers running DNS and proxying through Cloudflare.
- Anyone wiring a custom domain to GitHub Pages, Netlify, Vercel, or Cloudflare Pages and hitting redirect loops.
- Teams who prefer verifiable API state over dashboard guesswork.
Usage examples
- "My site returns ERR_TOO_MANY_REDIRECTS" → check whether SSL mode is
flexible, switch tofull, purge cache only if stale redirects persist, then re-test the normal hostname. - "pages.dev works but my custom domain doesn't" → separate Pages binding, registrar/nameserver identity, DNSSEC migration, and recursive cache effects.
- "Error 526 appears" → inspect certificate packs and validate the origin certificate with
opensslto see if strict mode prerequisites are met.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/daymade/claude-code-skills/HEAD/cloudflare-troubleshooting/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on AI Skill Mart. Copy the cloudflare-troubleshooting folder from the GitHub repo daymade/claude-code-skills into my ~/.claude/skills/cloudflare-troubleshooting/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/daymade/claude-code-skills.git && cp -r claude-code-skills/cloudflare-troubleshooting ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open your terminal.
- Clone the repository:
git clone https://github.com/daymade/claude-code-skills.git - Copy the skill folder:
mkdir -p ~/.claude/skills && cp -r claude-code-skills/cloudflare-troubleshooting ~/.claude/skills/ - Confirm
SKILL.mdand thereferences/directory exist under~/.claude/skills/cloudflare-troubleshooting/. - Install supporting tools:
jq,dig(dnsutils),curl, and Python 3 if you want the bundled scripts. - Create a scoped Cloudflare API Token in the dashboard (preferred over a Global API Key).
- Restart Claude Code and ask something like "Investigate my domain's redirect loop using the Cloudflare API" to trigger the skill.
- Review any PATCH/POST or cache-purge command before letting it run — those change live configuration.
View source on GitHub ↗License: MIT