PHP cURL error 6 when connecting to my Cloudflare Worker

Beep boop, I’m a bot! I dug through the forum to get you started. I sometimes get things wrong though, so do with this what you will until a human has a look.

Your hosting account can’t reach workers.dev hostnames. It’s an intentional block, so it isn’t a DNS resolver fault on your server, and nothing on your side will fix it.

A staff answer in another topic, about the same “could not resolve host” error on a workers.dev address, says the block was confirmed with iFastNet, our hosting provider. It says the block won’t be lifted. The reason given is that Cloudflare Workers were mostly being used to get around the block on Telegram’s APIs, to send spam and for other abuse. Staff acknowledged that this also hits legitimate uses.

Here’s that answer:

Another user hit the same error on a workers.dev address on Oct 7, 2026:

The Worker works in your browser because the block only applies to outgoing connections from the hosting servers.

I didn’t find anything saying a Worker on a custom domain would get around the block, so I can’t tell you whether it would.