https://discord.cloudflare.com logo
Join Discord
Powered by
# workers-discussions
  • j

    James

    04/12/2023, 6:48 PM
    Yeah okay cool
  • c

    Chaika

    04/12/2023, 6:48 PM
    yeah sorry I clarified in the edit but it was too late lol
  • c

    Chaika

    04/12/2023, 6:50 PM
    My understanding is they are entirely different internally. Routes are way more flexible (you can subpath matching, wildcards, etc). Custom Domains have other special features as well, like you are supposed to be able to fetch from a same-zone custom domain which you can't with routes (I think that's broken right now though)
  • c

    Chaika

    04/12/2023, 6:50 PM
    Custom Domains are supposed to be an actual normalish origin
  • r

    Ryder Cragie

    04/12/2023, 6:51 PM
    So if you only want the Cloudflare worker on it then use a Custom Domain, and if you've got a third-party service on it then use a Route. Right?
  • r

    Ryder Cragie

    04/12/2023, 6:52 PM
    That's what I'm gathering, though I'm still a bit confused.
  • c

    Chaika

    04/12/2023, 6:54 PM
    So if you only want the Cloudflare worker on it then use a Custom Domain, and if you want your worker run in front of an existing origin (changing the response, running only on a subpath, etc), use routes
  • c

    Chaika

    04/12/2023, 6:55 PM
    I think that's a fine way to view it. There is a few other cases, like how Custom Domains let you run workers on 2nd level or deeper subdomains because they give you a free cert
  • r

    Ryder Cragie

    04/12/2023, 6:55 PM
    That code James sent doesn't work with a Route. Only works with a Custom Domain. This is the part I'm trying to understand. Would a Route require a DNS record?
  • r

    Ryder Cragie

    04/12/2023, 6:55 PM
    And a Custom Domain would automatically add it?
  • c

    Chaika

    04/12/2023, 6:56 PM
    If it works with a custom domain, it'll work on a route too (besides same-zone fetches to another worker). You just need to manually create a DNS Record (use AAAA target 100:: proxied)
  • c

    Chaika

    04/12/2023, 6:56 PM
    Yes, that's one thing Custom domains do, create the dns record for you
  • r

    Ryder Cragie

    04/12/2023, 6:57 PM
    Right. I think I've got it.
  • r

    Ryder Cragie

    04/12/2023, 6:59 PM
    So for the code James sent I need it on both so it includes the path?
  • r

    Ryder Cragie

    04/12/2023, 6:59 PM
    Or can I get rid of the Route?
  • r

    Ryder Cragie

    04/12/2023, 7:00 PM
    Does the Custom Domain cover paths?
  • c

    Chaika

    04/12/2023, 7:02 PM
    Custom domain is like a normal dns record/origin, it covers all paths
  • c

    Chaika

    04/12/2023, 7:03 PM
    Get rid of the route, it's one or the other
  • r

    Ryder Cragie

    04/12/2023, 7:06 PM
    How many certificates does it deploy??
  • r

    Ryder Cragie

    04/12/2023, 7:06 PM
    1 Advanced or 2 Advanced?
  • c

    Chaika

    04/12/2023, 7:06 PM
    Each Custom Domain has its own adv. cert
  • c

    Chaika

    04/12/2023, 7:06 PM
    Should just be one, you can see it under your zone's ssl/tls -> edge certs
  • r

    Ryder Cragie

    04/12/2023, 7:06 PM
    Yeah I've got 2. Will delete one.
  • c

    Chaika

    04/12/2023, 7:07 PM
    Did you create and delete a custom domain or something? It should only be one. It doesn't clean them up after you delete the custom domain though
  • c

    Chaika

    04/12/2023, 7:07 PM
    I would be uhh careful about what you delete lol
  • r

    Ryder Cragie

    04/12/2023, 7:07 PM
    It made 2 for some reason.
  • r

    Ryder Cragie

    04/12/2023, 7:07 PM
    I've sorted it I think.
  • r

    Ryder Cragie

    04/12/2023, 7:10 PM
    I think I broke it.
  • r

    Ryder Cragie

    04/12/2023, 7:10 PM
    Or maybe it takes a while.
  • c

    Chaika

    04/12/2023, 7:13 PM
    It can take a bit. You don't need it eitherway, your universal already covers it. Your custom domain should already be working
1...238823892390...2509Latest