> ## Content Index
> Fetch the complete content index at: https://kudithipudi.org/llms.txt
> Use this file to discover other available public pages before exploring further.

# HOW TO : Check DNS from different locations with Cloudflare Workers
- URL: https://kudithipudi.org/how-to-check-dns-from-different-locations-with-cloudflare-workers/
- Published: 2026-09-03T16:10:49.000Z
- Updated: 2026-09-04T01:51:33.000Z
- Description: I wanted to know whether lab.kudithipudi.org resolves the same way in São Paulo as it does in Ashburn. Instead of managing VMs around the world, I used eight region-pinned Cloudflare Durable Objects to run DNS-over-HTTPS lookups from different locations and compare the answers.
- Author: Vinay Kudithipudi
- Tags: AI, network, Web, Technology

I wanted to know if `lab.kudithipudi.org` resolves the same way in São Paulo as it does in Ashburn. Whether a resolver across the world sees the same DNS answer, the same CNAME chain, and similar latency..

The obvious move is to spin up small VMs in multiple regions and run `dig` from each. But I did not want to manage and pay for five VMs to answer a question I only ask once a month. I already had a small FastAPI diagnostics page on my lab site, and I wanted a card that ran global DNS checks on demand from a single backend click.

I have always wanted to check out [Cloudflare Workers](https://developers.cloudflare.com/workers/?ref=kudithipudi.org) as a way to deploy distributed tools without added infrastructure complexity. Instead of renting VMs across the globe, I built a setup that uses eight region-pinned [Durable Objects](https://developers.cloudflare.com/durable-objects/?ref=kudithipudi.org) to run [DNS-over-HTTPS](https://en.wikipedia.org/wiki/DNS%5Fover%5FHTTPS?ref=kudithipudi.org) queries simultaneously.

### Why a plain Worker can't do it

A plain Worker runs in the edge data center nearest to whoever invokes it. Since my FastAPI service runs on a single VPS, every request would hit roughly the same local data center, and standard Workers do not let you specify an execution location per call.

Durable Objects provide the one feature I needed: `locationHint`, which lets me place individual objects into specific regions around the world. I do not use them for storage, coordination, or persistent state. They simply act as eight geographically placed vessels to run a few lines of JavaScript on Cloudflare's free tier.

![](https://kudithipudi.org/content/images/2026/09/image.png)

### How it works

When I submit a hostname and record type (A or AAAA), the front-door Worker fans out to eight region-pinned Durable Objects: `wnam`, `enam`, `weur`, `eeur`, `apac-se`, `oc`, `afr`, and `sam`.

Each object executes a DNS-over-HTTPS lookup against `cloudflare-dns.com` and times the response. `DurableObjectNamespace.get()` accepts a `locationHint`, and only the initial `get()` that creates an object ID honors that hint—after that, the object stays pinned where it landed.

### Caveats and precision

- The workers placement is best-effort. Cloudflare supports broad regions rather than specific cities, and routing can adjust based on capacity. For example, an African hint might occasionally land in Madrid, or South America in Newark. Because an instance stays pinned permanently once created, changing regions requires bumping the version string in the object name (e.g., `probe-v2-<region>`).
- Because 1.1.1.1 does not forward EDNS Client Subnet (ECS), this test shows what Cloudflare’s resolver sees from that vantage point, not necessarily what a local ISP resolver would return for CDNs that steer traffic based on client IP.

Check out the app at [https://lab.kudithipudi.org/net-tools/](https://lab.kudithipudi.org/net-tools/?ref=kudithipudi.org)

The code and deployment instructions are available on [GitHub](https://github.com/kudithipudi/dns-geo-check?ref=kudithipudi.org). While I have wanted to build this for a while, it is a great example of how AI-assisted development enables non-developers to build and deploy useful distributed applications quickly.