Skip to content
AnswerWell geo Documentation

Research · 9 min read · Answerwell

Tunnel Errors, HTTPS Origin TLS, and Outbound Connectivity

Fix Cloudflare Tunnel error 1033 and 502, outbound DNS and port 7844 checks, and HTTPS origin TLS settings for cloudflared routes.

This page summarises Cloudflare documentation on Cloudflare Tunnel (cloudflared): when visitors see errors, whether the break is between Cloudflare and cloudflared or between cloudflared and your local service, and how to fix DNS, firewall, route, and TLS settings.

Two failure paths: edge connection vs origin reachability

Section titled “Two failure paths: edge connection vs origin reachability”

A Healthy tunnel in the dashboard only means cloudflared is connected to Cloudflare. It does not prove the route’s Service URL works or that the local origin accepts traffic.

A Healthy status confirms only that cloudflared connects to Cloudflare. It does not test the route’s service or the local origin.

— Cloudflare, Troubleshoot HTTPS origins with Cloudflare Tunnel

Symptom Layer Typical cause
Error 1033 Cloudflare → cloudflared No healthy connector, wrong tunnel CNAME, tunnel Down/Inactive
502 Bad Gateway (“Unable to reach the origin service”) cloudflared → origin Service down, wrong port/protocol, TLS mismatch, firewall on origin
Browser SSL errors on the public hostname Edge certificate / DNS Multi-level subdomain not covered by Universal SSL, wrong encryption mode

A 502 Bad Gateway error with Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared on a tunnel route means the tunnel itself is connected to the Cloudflare network, but cloudflared cannot reach the origin service defined in your ingress rule. Unlike error 1033, which indicates the tunnel is not connected to Cloudflare, a 502 error indicates the problem is between cloudflared and your local service.

— Cloudflare, Common tunnel errors

Error 1033: tunnel not connected to the edge

Section titled “Error 1033: tunnel not connected to the edge”

Error 1033 means Cloudflare cannot hand traffic to a healthy cloudflared instance for that hostname.

A 1033 error indicates your tunnel is not connected to Cloudflare’s network because Cloudflare’s network cannot find a healthy cloudflared instance to receive the traffic.

— Cloudflare, Error 1033: Cloudflare Tunnel error

Check Networking → Tunnels in the Cloudflare dashboard or run cloudflared tunnel list. Match the status to the action below (from Common tunnel errors):

Status Meaning Action
Healthy Active; four connections to the global network No action if 1033 persists, verify DNS (below)
Inactive Tunnel created but connector never ran Install and run cloudflared; use Add a replica on the tunnel Overview
Down Was connected; process stopped Restart the cloudflared service; check power, crashes, network changes
Degraded Serving traffic but at least one connection failed Review logs; allow outbound to Tunnel IPs/ports (see connectivity pre-checks)

If the tunnel shows Active but you still get 1033, confirm the public hostname CNAME targets the correct tunnel subdomain. On FedRAMP High accounts, the CNAME must point to <UUID>.fed-cfargotunnel.com; pointing at <UUID>.cfargotunnel.com returns 1033 even when the tunnel is healthy (Error 1033).

When saving a public hostname fails with “An A, AAAA, or CNAME record with that host already exists”, pick another hostname or remove the conflicting record in DNS records for your domain.

Outbound DNS and port 7844: why cloudflared never goes Healthy

Section titled “Outbound DNS and port 7844: why cloudflared never goes Healthy”

Before origin settings matter, the host running cloudflared must resolve Tunnel endpoints and reach them on port 7844 (QUIC/UDP with HTTP/2 TCP fallback). See Connectivity pre-checks and Tunnel troubleshooting.

DNS for region endpoints and SRV discovery

Section titled “DNS for region endpoints and SRV discovery”

cloudflared needs outbound connectivity to region1.v2.argotunnel.com and region2.v2.argotunnel.com (or us-region1 / us-region2, or fed-region1 / fed-region2 in those regions). A healthy deployment typically has four active replicas reaching both regions.

Cloudflare Tunnel requires outbound connectivity to region1.v2.argotunnel.com and region2.v2.argotunnel.com (or to the equivalent us-region1 and us-region2 endpoints when using the US region, or fed-region1 and fed-region2 when using the FedRAMP High region).

— Cloudflare, Connectivity pre-checks

Test A/AAAA records with dig; if your resolver returns SERVFAIL, NXDOMAIN, or empty answers, compare against Cloudflare DNS 1.1.1.1:

dig A region1.v2.argotunnel.com
dig A region1.v2.argotunnel.com @1.1.1.1

Edge discovery uses SRV _v2-origintunneld._tcp.argotunnel.com. Corporate resolvers that strip SRV records produce:

ERR edge discovery: error looking up Cloudflare edge IPs: the DNS query failed

On Windows without dig, use Resolve-DnsName as in Tunnel with firewall. In Docker/Kubernetes, fix container DNS (for example --dns 1.1.1.1) when the internal resolver times out (Tunnel troubleshooting).

If DNS works but the connector logs QUIC handshake timeouts, outbound UDP to Tunnel IPs on 7844 is often blocked. cloudflared retries and may fall back to HTTP/2 over TCP on the same port.

This usually indicates a firewall policy or upstream security control that does not allow outbound traffic (or return traffic) on port 7844.

— Cloudflare, Connectivity pre-checks

Test from the cloudflared host (replace the IP with one from your logs):

nc -uvz -w 3 198.41.192.227 7844
nc -vz -w 3 198.41.200.43 7844

If both UDP and TCP fail on 7844, the tunnel cannot function until your network allows that outbound path (Tunnel troubleshooting).

Error 502 and origin logs: service URL, protocol, and port

Section titled “Error 502 and origin logs: service URL, protocol, and port”

For 502 errors, read tunnel logs (cloudflared tail <TUNNEL_UUID> or Live logs in the dashboard). Common log patterns from Common tunnel errors:

Log hint Fix
dial tcp ... connect: connection refused Start the app; confirm listen port with curl -v or ss -tlnp
malformed HTTP response with TLS bytes Service URL protocol wrong (http:// vs https://)
Wrong port in URL Align ingress Service URL port with the listener

The public hostname visitors type is not the Service URL cloudflared dials locally. Do not use the public hostname as the service URL when that name is a Tunnel CNAME (Troubleshoot HTTPS origins).

If the app sits behind a load balancer, set HTTP Host Header to the service hostname so traffic is identified correctly (Best practices).

For private applications, confirm static routes exist if tunnel logs show no requests (Troubleshoot private networks). From the cloudflared host, test telnet / Test-NetConnection to the application host and port; firewalls between cloudflared and the app are a frequent cause.

Workers VPC upstream errors (connection_refused, tls_certificate_error, dns_error, and others) mean Cloudflare reached toward your private service but the tunnel, listener, network path, or TLS failed—see the error table in Workers VPC troubleshooting. For HTTPS private services, VPC Services trusts publicly trusted CAs, Cloudflare Origin CA, or you configure verification via Terraform tls_settings (verify_full, verify_ca, disabled) in Configure with Terraform.

For Cloudflare WAN / private origins, verify Source IP is a private range (for example 100.64.0.0/12), return routing for that range, private_routing on the DNS record, and proxy status (Set up a private origin via Cloudflare WAN, Private origins troubleshooting).

HTTPS origin TLS: Service URL, originServerName, and zone SSL/TLS

Section titled “HTTPS origin TLS: Service URL, originServerName, and zone SSL/TLS”

For HTTPS backends, keep TLS certificate verification enabled unless you are temporarily fixing trust (Best practices).

If your public hostname route serves an HTTPS application, keep TLS certificate verification enabled. If the service URL uses localhost or an IP address but the certificate covers a hostname, set Origin Server Name to the hostname covered by the certificate. If the origin uses a private certificate authority, set CA Pool.

— Cloudflare, Best practices

Log / error Meaning Fix
x509: certificate is valid for example.com, not localhost Cert SAN does not match Service URL host Set originServerName to the name on the certificate (SNI)
x509: certificate signed by unknown authority cloudflared does not trust the issuer Add CA to system trust, set caPool / caPool PEM, avoid permanent noTLSVerify

Turn on Disable TLS certificate verification only for temporary testing while you fix the certificate configuration.

— Cloudflare, Best practices

For ingress rules, set originRequest.originServerName, originRequest.caPool, and originRequest.noTLSVerify in config.yml—not only CLI flags for a single --url (Common tunnel errors).

Example (verification on, Let’s Encrypt on localhost):

ingress:
- hostname: app.example.com
service: https://localhost:443
originRequest:
originServerName: app.example.com
- service: http_status:404

Validate after edits:

cloudflared tunnel ingress validate

On the cloudflared host, check the cert and SNI:

openssl s_client -connect 127.0.0.1:443 -servername app.example.com -verify_hostname app.example.com -verify_return_error </dev/null

Expect Verify return code: 0 (ok) when configuration matches Troubleshoot HTTPS origins.

Zone SSL/TLS mode does not fix the local hop

Section titled “Zone SSL/TLS mode does not fix the local hop”

Zone SSL/TLS encryption mode is separate from the Tunnel route. It does not pick HTTP vs HTTPS to the origin or fix cloudflared–origin certificate errors.

The zone SSL/TLS mode is separate from the Tunnel route. It does not select the local protocol or fix a certificate mismatch between cloudflared and the origin.

— Cloudflare, Troubleshoot HTTPS origins with Cloudflare Tunnel

Do not switch to Flexible to solve origin cert mismatches or redirect loops; update Service URL and origin parameters instead. An HTTP Service URL against an origin that redirects to HTTPS can loop—test with curl -sS -D - and limit redirects (Troubleshoot HTTPS origins).

remote error: tls: handshake failure on the connector or browser ERR_SSL_VERSION_OR_CIPHER_MISMATCH may mean the hostname is not covered—Universal SSL does not cover more than one level of subdomain; order an Advanced Certificate (Common tunnel errors).

Section titled “WebSocket and Access-related handshake errors”

websocket: bad handshake on cloudflared access often traces to the same origin/TLS issues as 502, or to edge policy: tunnel not connected, WebSockets disabled, SSL/TLS mode Off, Super Bot Fight Mode, Access Binding Cookie on SSH/RDP apps, or a Workers route overlapping the tunnel hostname (Common tunnel errors).

  • Treating Healthy tunnel status as proof the app route works.
  • Using Flexible zone mode instead of fixing Service URL / originServerName.
  • Leaving noTLSVerify: true on after a quick test.
  • Wrong FedRAMP CNAME target (cfargotunnel.com vs fed-cfargotunnel.com).
  • Blocking outbound 7844 or corporate DNS blocking Tunnel SRV lookups.
  • Skipping return routes for Cloudflare Source IP private ranges on WAN/private origin setups.
  • Running two cloudflared services on one host instead of adding ingress routes.

When opening a support ticket, include tunnel ID and name, cloudflared --version, setup type (locally- vs remotely-managed), timestamps, reproduction steps, and tunnel/diagnostic logs (Connectivity pre-checks — Get help).

  1. In the Cloudflare dashboard under Networking → Tunnels, confirm the tunnel is Healthy and the public hostname CNAME matches your environment (including FedRAMP targets if applicable).

  2. On the cloudflared host, run DNS checks from Connectivity pre-checks (dig A region1.v2.argotunnel.com and SRV _v2-origintunneld._tcp.argotunnel.com) and confirm outbound 7844 with nc or PowerShell tnc per Tunnel with firewall.

  3. Stream logs with cloudflared tail <TUNNEL_UUID> or Live logs and map messages to Common tunnel errors (1033 vs 502, x509, connection refused).

  4. For HTTPS apps, verify Service URL, Origin Server Name, and TLS verification against Troubleshoot HTTPS origins and test the origin with curl / openssl s_client from the same host as cloudflared.

  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact statement you are asking about, and we will correct or clarify it.