What is the name of the domain?
What is the error message?
cannot forward email to same worker
What is the issue you’re encountering
I have had an Email Worker configured to forward emails as the catch-all handler in a TLD domain example.com, as well as a subdomain of it x, to an email address in different subdomain y of the TLD, e.g. [email protected]. Note that the subdomain y is not setup as a subdomain in Cloudflare’s Email Routing Settings, but does have DNS MX settings for an external email service. This had been working for several months when I decided to retire the subdomain x. I’m not sure if it is linked but since deleting the subdomain from Cloudflare’s Email Routing Settings on 2025-05-27 (and choosing the option to delete the subdomains DNS records) I have since noticed that the forwarding of emails sent to the TLD was failing intermittently, perhaps around 50% of the time based on when I tested the forwarding myself. From checking my logs, when the forwarding fails it is because ForwardableEmailMessage forward() is throwing an exception with the message “cannot forward email to same worker”. To me this error message is suggesting that the Runtime believes that the subdomain y of the forwarding destination address is a subdomain handled by Email Routing. It definitely is not and never has been. Seems that a bug may have been recently introduced into the Runtime which occurs only when forwarding to a subdomain of the Email Routing domain not handled by Email Routing. Any suggestions?
What steps have you taken to resolve the issue?
Deleting the Worker and redeploying it and then reconfiguring it as the domain’s catch-all has not fixed the issue.
What are the steps to reproduce the issue?
In Email Routing configure an Email Worker to forward emails as the catch-all handler in a TLD domain to an address in a subdomain y of the TLD, where y is not configured as a subdomain handled by Email Routing. Optionally, also configure a subdomain x as a subdomain handled by Email Routing.