Cloudflared Tunnel Connected But Site Still Times Out — Complete Debug Guide (2026)
How to fix Cloudflare Tunnel when the tunnel shows healthy but your site remains inaccessibleFew self-hosting problems are more frustrating than this.
You run your tunnel.
Cloudflared shows:
Everything looks healthy.
No obvious errors.
Yet your public domain still times out.
The browser spins endlessly.
No response.
No useful error.
If you've ever self-hosted a Next.js app, internal dashboard, or Linux service behind Cloudflare Tunnel, you've probably seen this exact situation.
The tunnel is active.
But the site is still unreachable.
This guide walks through the complete production debugging workflow for fixing Cloudflared tunnels that appear connected but fail to serve traffic.
The 5 Most Common Causes
When a tunnel is connected but inaccessible, the problem usually falls into one of these categories:
1. DNS mismatch
2. Incorrect tunnel ingress config
3. Origin service unreachable
4. Nginx upstream failure
5. Credential or routing issues
Let's debug each one.
---
Step 1: Verify Tunnel Is Actually Connected
Start by checking tunnel status:
Healthy output should show:
Then inspect logs:
journalctl -u cloudflared -f
Look for:
Registered tunnel connection
Connection established
Bad signs include:
Tunnel credentials file doesn't exist
Unauthorized
Failed to serve tunnel connection
If credentials are broken, skip to Step 6.
---
Step 2: Validate DNS Mapping
This is the most common real-world failure.
Your tunnel is healthy, but DNS points somewhere else.
Check your DNS record in Cloudflare.
For a tunnel-backed domain, you should have:
Type: CNAME
Name: yourdomain.com
Target: <tunnel-id>.cfargotunnel.com
Proxy: Enabled
---
Validate DNS Resolution
Run:
or:
If resolution doesn't match your tunnel endpoint, DNS is misconfigured.
---
Common DNS Mismatch Issues
Old A Record Still Exists
Cloudflare may still point traffic to an old VPS IP.
Remove stale A records.
---
Multiple Conflicting Records
If both A and CNAME exist, routing becomes unpredictable.
Use one authoritative tunnel record.
---
Wrong Tunnel Target
A typo in tunnel UUID breaks routing entirely.
---
Step 3: Check Cloudflared Config
Inspect:
/etc/cloudflared/config.yml
Example working config:
tunnel: your-tunnel-id
credentials-file: /root/.cloudflared/your-tunnel.json
ingress:
- hostname: yourdomain.com
service: http://localhost:3000
- service: http_status:404
---
Common Config Mistakes
Wrong Local Port
Example:
service: http://localhost:3001
while your app runs on:
This creates silent timeout behavior.
---
Missing Hostname Match
If ingress hostname doesn't match DNS hostname, routing fails.
---
Bad YAML Formatting
Even small indentation errors break routing.
Validate carefully.
---
Step 4: Confirm Origin Service Is Reachable
Cloudflare Tunnel only proxies.
Your local service must actually respond.
Test directly on the server:
curl http://localhost:3000
Healthy response:
If curl hangs or fails, your tunnel is fine.
Your app is not.
---
Common Origin Failures
Next.js App Not Running
Check:
or:
---
Port Conflict
You may see:
Another service already owns the port.
---
App Crashed During Build
Verify logs:
---
Step 5: Debug Nginx Upstream
If Cloudflared points to Nginx instead of directly to Next.js:
service: http://localhost:80
Then Nginx becomes part of the chain.
Validate config:
Then inspect upstream:
location / {
proxy_pass http://127.0.0.1:3000;
}
---
Common Nginx Problems
Wrong Upstream Port
Nginx proxies to dead service.
---
Missing Reverse Proxy Headers
For Next.js:
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
---
Nginx Not Reloaded
After config changes:
sudo systemctl reload nginx
---
Step 6: Validate Tunnel Credentials
Credential corruption causes misleading partial connections.
Check:
You should see:
cert.pemtunnel-id.jsonconfig.yml---
If missing:
Re-authenticate:
Then recreate credentials:
cloudflared tunnel create mytunnel
---
Common Credential Errors
Tunnel credentials file doesn't exist
or:
Unauthorized: failed authentication
These require credential regeneration.
---
Step 7: Test Full End-to-End Routing
Validate every layer.
---
Local app
---
Nginx
---
Public domain
curl https://yourdomain.com
Find the exact layer where failure begins.
This isolates the issue fast.
---
Production Debugging Sequence I Use
When a connected tunnel times out, I run this exact flow:
cloudflared tunnel list
journalctl -u cloudflared -f
curl localhost:3000
sudo nginx -t
pm2 status
dig yourdomain.com
This usually identifies the issue within minutes.
---
Prevention Checklist
To avoid future tunnel failures:
Use systemd for cloudflared
sudo systemctl enable cloudflared
---
Monitor tunnel logs
Persistent logging catches failures early.
---
Keep ingress config simple
Avoid unnecessary routing layers.
---
Validate DNS after changes
Cloudflare dashboard mistakes are common.
---
Test locally before exposing publicly
Always verify origin first.
---
Final Thoughts
A connected Cloudflared tunnel does not guarantee a reachable site.
Think of the request path like this:
Cloudflare Edge → Tunnel → Local Connector → Nginx → AppA failure anywhere in that chain causes timeouts.
The key is methodical isolation.
Check each layer.
Validate assumptions.
Debug from local origin outward.
That’s how production tunnel issues get solved fast.