Configure rules and addresses
An email rule is a pair of a custom email address and a destination address, or a custom email address with an Email Worker. This allows you to route emails to your preferred inbox, or apply logic through Email Workers before deciding what should happen to your emails. You can have multiple custom addresses, to route email from specific providers to specific mail inboxes.
- Log in to the Cloudflare dashboard ↗ and select your account and domain.
- Go to Email > Email Routing > Routes.
- Select Create address.
- In Custom address, enter the custom email address you want to use (for example,
my-new-email
). - In the Action drop-down menu, choose what this email rule should do. Refer to Email rule actions for more information.
- In Destination, choose the email address or Email Worker you want your emails to be forwarded to — for example,
[email protected]
. You can only choose a destination addresses you have already verified. To add new destination addresses, refer to Destination addresses.
When creating an email rule, you must specify an Action:
- Send to an email: Emails will be routed to your destination address. This is the default action.
- Send to a Worker: Emails will be processed by the logic in your Email Worker.
- Drop: Deletes emails sent to the custom address without routing them. This can be useful if you want to make an email address appear valid for privacy reasons.
- Log in to the Cloudflare dashboard ↗ and select your account and domain.
- Go to Email > Email Routing > Routes.
- In Custom addresses, identify the email rule you want to pause, and toggle the status button to Disabled.
Your email rule is now disabled. It will not forward emails to a destination address or Email Worker. To forward emails again, toggle the email rule status button to Active.
- Log in to the Cloudflare dashboard ↗ and select your account and domain.
- Go to Email > Email Routing > Routes.
- In Custom addresses, identify the email rule you want to edit, and select Edit.
- Make the appropriate changes to this custom address.
When you enable this feature, Email Routing will catch variations of email addresses to make them valid for the specified domain. For example, if you created an email rule for [email protected]
and a sender accidentally types [email protected]
, the email will still be correctly handled if you have Catch-all addresses enabled.
To enable Catch-all addresses:
- Log in to the Cloudflare dashboard ↗ and select your account and domain.
- Go to Email > Email Routing > Routes.
- Enable Catch-all address, so it shows as Active.
- In the Action drop-down menu, select what to do with these emails. Refer to Email rule actions for more information.
- Select Save.
This section lets you manage your destination addresses. It lists all email addresses already verified, as well as email addresses pending verification. You can resend verification emails or delete destination addresses.
Destination addresses are shared at the account level, and can be reused with any other domain in your account. This means the same destination address will be available to different domains in your account.
To prevent spam, email rules do not become active until after the destination address has been verified. Cloudflare sends a verification email to destination addresses specified in Custom addresses. You have to select Verify email address in that email to activate a destination address.