Trigger edge functions for dynamic urls like **

Hi fellas, I have a quick question can we define dynamic url for our netlify functions. So, that it is not tied to just certain subdomain or root domain. I want to trigger my edge function whenever users visit any url that has my domain.
I can see cloudflare has something called worker routes. Workers are very similar to netlify edge function as far as I understand. But, the cool thing is you can define routes(even dynamic routes with * wildcard) when to trigger this worker. The prerequiste to this is you delegate DNS nameservers to cloudflare.
I can see we can delegate DNS nameservers to netlify also but i cannot find anything similar to routes. Please point me in the right direction.

Hi @devnrj07! Simon from the Team working on Edge Functions here.

Netlify Edge Functions are defined in the context of a specific site, and with the path /* they will be run for all requests to that site (see docs). A site can have multiple domains assigned (see docs). If you combine this, all your traffic going to one of site’s domains will be run through your edge function. Inside the edge function, you can use request.url to look up which domain was used.

Does that help solve your usecase?

1 Like

Hey @skn0tt Thanks for the quick reply. I don’t think that’ll work in my case. My idea is to point apex domain to edge function and then subdomains will point to their own websites or web servers. For ex. → could be a wordpress site,, → could be plain html → could be a react-app hosted on github. etc.
I want my edge function to get triggered whenever there is in the request.url. Hence, the worker route thing ** this will match anything like

Hi @devnrj07,

That’s currently not supported but we can add that as a feature request. We’ll let you know if something changes in this area.

1 Like

That would be great. Thanks