Custom Domain Setup for Worker - DNS Configuration with External DNS Provider

Hi , I need help setting up a custom domain for my Cloudflare Worker, but with a constraint: our main domain and DNS must remain managed with our external DNS provider. Current Setup: Worker name: my-worker Desired custom domain pattern: *.staging.example.com Goal: Route https://api.staging.example.com to my worker Constraint: Main domain example.com and all DNS records must stay with external DNS provider (AWS Route 53) Current plan: [Free/Pro/Business] Questions: Can I configure a Cloudflare Worker custom domain WITHOUT transferring my domain or DNS management to Cloudflare? What DNS records do I need to create in my external DNS provider to point a subdomain to my Cloudflare Worker? Is it possible to use Cloudflare Workers with custom domains while keeping the primary domain with external DNS? Do I need to use CNAME records pointing to my workers.dev subdomain, or is there another approach? What SSL certificate requirements exist when the domain DNS is managed outside Cloudflare? Would upgrading to the Business plan and using the Partial DNS feature help with this setup? Specifically: Does Partial DNS allow better integration with external DNS providers? Would Partial DNS solve custom domain issues when the main domain stays external? Are there DNS delegation benefits with Partial DNS for this use case? Important: We cannot move our domain or DNS management away from our current provider, but want to route specific subdomains to Cloudflare Workers.
1 Reply
SuperHelpflare
SuperHelpflare15h ago
Support AI
I'd be happy to help you with your questions. 1. Can I configure a Cloudflare Worker custom domain WITHOUT transferring my domain or DNS management to Cloudflare? According to the documentation, Custom Domains allow you to connect your Worker to a domain or subdomain without having to make changes to your DNS settings or perform any certificate management. However, it's mentioned that Workers Custom Domains only supports domains that are configured as zones on your account. A zone refers to a domain (such as example.com) that Cloudflare manages for you, including its DNS and traffic. (Source: https://developers.cloudflare.com/workers/static-assets/migration-guides/vercel-to-workers/) 2. What DNS records do I need to create in my external DNS provider to point a subdomain to my Cloudflare Worker? Unfortunately, the provided documentation does not explicitly state the DNS records required to point a subdomain to a Cloudflare Worker when the main domain is managed externally. However, it's mentioned that Custom Domains can stack on top of each other, and you can create a Request object with the target URI and use fetch() to reach out to external dependencies. (Source: https://developers.cloudflare.com/workers/configuration/routing/custom-domains/) 3. Is it possible to use Cloudflare Workers with custom domains while keeping the primary domain with external DNS? As mentioned earlier, Custom Domains require the domain to be configured as a zone on your Cloudflare account. However, it's possible to use Cloudflare Workers with custom domains while keeping the primary domain with external DNS by using the Partial DNS feature, which is available on the Business plan. (Source: https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/get-started/hostname-routing/) 4. Do I need to use CNAME records pointing to my workers.dev subdomain, or is there another approach? The documentation does not explicitly state the use of CNAME records pointing to the workers.dev subdomain. However, it's mentioned that you can create a Request object with the target URI and use fetch() to reach out to external dependencies. 5. What SSL certificate requirements exist when the domain DNS is managed outside Cloudflare? The documentation does not explicitly state the SSL certificate requirements when the domain DNS is managed outside Cloudflare. However, it's mentioned that Cloudflare will create DNS records and issue necessary certificates on your behalf when you set up a Custom Domain for your Worker. (Source: https://developers.cloudflare.com/workers/configuration/routing/custom-domains/) 6. Would upgrading to the Business plan and using the Partial DNS feature help with this setup? According to the documentation, Partial DNS allows you to manage a subset of your DNS records with Cloudflare while keeping the rest of your DNS records with your external DNS provider. This feature is available on the Business plan. (Source: https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/get-started/hostname-routing/) 7. Does Partial DNS allow better integration with external DNS providers? Yes, Partial DNS allows better integration with external DNS providers by enabling you to manage a subset of your DNS records with Cloudflare while keeping the rest of your DNS records with your external DNS provider. 8. Would Partial DNS solve custom domain issues when the main domain stays external? Partial DNS can help with custom domain issues when the main domain stays external by allowing you to manage a subset of your DNS records with Cloudflare. 9. Are there DNS delegation benefits with Partial DNS for this use case? Yes, Partial DNS provides DNS delegation benefits by enabling you to manage a subset of your DNS records with Cloudflare while keeping the rest of your DNS records with your external DNS provider.
This is an AI generated response, it may not be 100% accurate. Please validate the output. You can ask followups by replying to this message or mentioning me.

Did you find this page helpful?