Can I use a root domain (e.g., `yourcompany.com`) for a Cloudflare Worker, or only subdomains?

Question

Grade: Education Subject: Support
Can I use a root domain (e.g., `yourcompany.com`) for a Cloudflare Worker, or only subdomains?
Asked by:
94 Viewed 94 Answers

Answer (94)

Best Answer
(304)
You can use both root domains and subdomains. If you want to use a root domain, you'll typically set up an A record that points to Cloudflare's Anycast IP addresses, and then ensure the traffic is proxied through Cloudflare. For subdomains, a CNAME record is the more common and straightforward approach.