Do you already have a Record (CNAME or A
Do you already have a Record (CNAME or A... whatever) for
www subdomain pointing somewhere else? If so it wont let Wrangler override that and automagically create one. Also I havent checked but I am not sure that override_existing_dns_record exists on Wrangler config (could be wrong) it might be referring to the API5 Replies
Thanks for the response! Not trying to hijack the wrangler thread for DNS issues.
I do believe that
override_existing_dns_record is an existing property in wrangler, which is why I brought it up. It just doesn't seem to work, at least in my case.
In terms of my specific case, I did add a rule to route non-www to www, I can try removing that. Also, I tried the pattern of just my-site.com (no www), but was giving me the same error. And I'm a bit unsure which DNS records I need to clear out to get this working. Created a thread specifically for this at https://discord.com/channels/595317990191398933/1360897401463902288.
Couldnt find the override property in the schema https://unpkg.com/wrangler@4.10.0/config-schema.json
or Docs https://developers.cloudflare.com/workers/wrangler/configuration/#routes
That being said, it very well could be undocumented.
As for trying it without the
www, did you manually set up records for the subdomain?
https://developers.cloudflare.com/workers/configuration/routing/custom-domains/#add-a-custom-domain
If the domain has existing CNAMEs the automagic wont work, hope the docs can be of more help than me 😅Regarding the www, there is a "Rules" section where I added two template rules. One
Redirect from HTTP to HTTPS [Template] URI Full wildcard r"http://*" 301 redirect and Redirect from Root to WWW [Template] URI Full wildcard r"https://<my-domain>.com/*" 301 redirect .
And it seems like when I navigate to the DNS area, it has like
Maybe those rules I previously setup are interfering with the wrangler routesMaybe, I dont remember how rules work under the hood and havent used them in a long time.
If they utilize CNAMEs then yes likely are interferring
Confused as to how to migrate a pages function to a worker using the routes
Using wrangler.toml to configure my worker routes. I am using pages custom domain (vanity domains) and im stuck trying to configure tihs for routes
for example:
routes = [
{ pattern = "apiw..mydomain.com", zone_id="adfxxxxx5197c2aa23dcc101b83df2f3"},
{ pattern = "/testw/*", zone_id="adfxxxxxd5197c2aa23dcc101b83df2f3"}
]
It works, but only for my zones id domain, not for all the other custom domains in my zone.
i expect that all other cnames would be triggered on this route for /testw/ hence "docs.anotherdomain.com/testw/" would also trigger the worker. The way i solve this now is using a Pages functions, using the /functions/w/[[catchall]].js and here is my woker which gets triggered on all routes (includeing custom domains)
i expect that all other cnames would be triggered on this route for /testw/ hence "docs.anotherdomain.com/testw/" would also trigger the worker. The way i solve this now is using a Pages functions, using the /functions/w/[[catchall]].js and here is my woker which gets triggered on all routes (includeing custom domains)