Cloudflare Worker Routes Issue


I have a single Cloudflare worker that serves HTML, and is connected with multiple routes (in this case kevin-feng[dot]com and wenqinye[dot]com).

When I go to wenqinye[dot]com the HTML loads; however, when I go to kevin-feng[dot]com for some reason it redirects to wenqinye[dot]om. Do you know why this is?

Thanks in advance!!

Your Worker itself appears to redirect to, so if you map the other domain to the same Worker it will naturally execute the same code and redirect to that domain as well.

You’ll probably want your Worker to work domain independent. You’d need to adjust your JavaScript for that. Check out StackOverflow as they can certainly help with the details.