As an administrator, use default routing to set up a domain-wide routing policy for inbound messages.
To set up default routing:
- Specify recipient addresses
- Specify actions to take on messages intended for the recipients.
For example, you can use default routing to set up split delivery. Split delivery routes messages for specific users to your on-premise mail server. This is useful when transitioning users from a legacy mail server to Gmail. Default routing also lets you specify an account as a catch-all address. Catch-all behavior is configured with a default route set up to redirect messages for unrecognized users. Default routing to unrecognized users affects users who don't exist, suspended users, and those with Gmail turned off.
Default routing settings have lower priority than other advanced Gmail settings, such as content and attachment compliance. When you create multiple routing settings, you can order the settings according to priority. Learn how in Ordering your routing settings.
For more information about setting up split delivery, catch-all addresses, and other routing options, visit Email routing and delivery.Set up default routing
From the Admin console Home page, go to AppsGoogle WorkspaceGmailDefault Routing.
- Click Configure to set up Default routing. Or, to add a new default routing rule, click Add another rule.
- Select the envelope recipients to match:
- Single recipient—Specify a single user by entering an email address, such as firstname.lastname@example.org.
- Pattern match—Enter a regular expression to specify a set of recipients in your domain.
- Group membership—Select from one or more groups in the list. Create your groups from the Groups tab.
Note: This option affects both direct and child group members. For example, if Group B is a member of Group A, users in Group B are child members of Group A.
All recipients—Specify all recipients in your domain. This option only affects unrecognized addresses. Suspended users, users with Gmail turned off, and users who don't exist are treated as unrecognized addresses.
- In the section If the envelope recipient matches the above, specify if messages should be modified or rejected when conditions match the setting.
This option lets you modify messages by: adding headers, changing the route, changing the envelope recipient, adding more recipients, and removing attachments.
Read more details about routing controls:Add X-Gm-Original-To header
This option adds a header tag in case the recipient is changed. This lets downstream servers know the original envelope recipient; for example, X-Gm-Original-To: email@example.com.
Adding the X-Gm-Original-To header is useful if you're redirecting a copy of the message to another recipient. The recipient address is changed, but the new recipient can see the original envelope recipient in the message X-Gm-Original-To header.
Messages routed through Gmail are automatically filtered for spam and phishing. Select Add X-Gm-Spam header and X-Gm-Phishy header to add the following headers to indicate the spam and phishing status of the message:
- 0 indicates a message is not spam: X-Gm-Spam: 0
- 1 indicates a message is spam: X-Gm-Spam: 1
- 0 indicates a message is not phishing: X-Gm-Phishy: 0
- 1 indicates a message is phishing: X-Gm-Phishy: 1
Note: Any message marked as phishy is automatically also marked as spam.
Selecting the Add X-Gm-Spam header and X-Gm-Phishy header option lets an administrator at a downstream server set up rules that handle spam and phishing differently than valid messages.
You can add 1 or more custom headers to messages that match your routing settings.
For example, add a header that matches the description you entered in the setting. This can help you determine how a message was routed, or why a filter was triggered.
You can enter a string to prepend to the subject of certain messages. For example, you might add Confidential to the subject line of certain messages. Message recipients see a message subject like: [Confidential] Monthly report.
Use the Change route option to change the destination of the message.
Gmail is always the primary delivery location for messages, but you can use this option to change the mail destination. For example, you can change the destination to an on-premise mail server like Microsoft Exchange.
Before you change mail destination, add mail routes for advanced Gmail delivery. Routes you add on the Hosts tab are displayed in the route list in the Change route option.
Also reroute spam
The Also reroute spam option is available when you select the Change route option. Also reroute spam lets you route all mail that matches the criteria in the setting, including mail that has been marked as spam.
When the Change route option is checked but the Also reroute spam option is unchecked, valid mail is rerouted but spam is not. Spam is stored in Google Workspace for 30 days.
- Blatant spam is never rerouted, and is dropped at delivery time.
- If mail is classified as spam but a Gmail setting overrides this (for example, a sender whitelist), Gmail won't treat the message as spam. The message is rerouted as valid mail.
Suppress bounces from this recipient
The Suppress bounces from this recipient option is available when you check the Change route box. Check this option to stop bounce messages from being rerouted. For example, you might want to prevent bounce messages from being rerouted to an automated system.
Leave this option unchecked to deliver bounce messages to the receiving mail server. This lets senders their message wasn't delivered.
To change the envelope recipient, click the option next to the Replace recipient field, then enter the new recipient's email address.
Changing the envelope recipient for a message on the primary delivery is the same as forwarding a message to a different recipient. You can also change the envelope recipient on the additional (secondary) delivery. This is the same as adding a recipient to the message Bcc.
Select this option to deliver incoming messages to recipients even when the message is identified as spam.
Select this option to remove attachments from messages. Optionally, you can add text to let recipients know the attachments were removed.
Check the Add more recipients box to set up additional deliveries for dual delivery or multiple delivery.
Select Basic to add individual email addresses, then click Save. To add multiple recipient addresses, click Add.
Select Advanced from the list to choose advanced options for your secondary delivery. Like primary delivery settings, you can change the envelope recipient, add headers, prepend a custom subject, and remove attachments for the secondary deliveries.
- Each rule has a limit of 100 extra recipients. Consider using groups for large lists.
- Any settings you set up for primary delivery also affect secondary deliveries. For example, if you change the envelope recipient and prepend a custom subject, these same changes apply to secondary deliveries.
- For secondary deliveries, the Do not deliver spam to this recipient and Suppress bounces from this recipient boxes are checked by default. Suppress bounces from this recipient prevent bounced messages to the original sender.
This option rejects the message before it reaches the intended recipient. You can enter customized text for the rejection notice.
Note: Routing settings with a Reject message action are automatically at the top of the default routing priority list. Learn more in Ordering your routing settings.
- In the Options section, choose to take an action only for unrecognized addresses, or for recognized and unrecognized addresses. Suspended users and users with Gmail turned off have unrecognized addresses.
- Click Save.
- At the bottom, click Save.
It can take up to 24 hours for your changes to take effect. You can monitor changes in the Admin console audit log.
You can create up to 1000 routing settings for your domain on the Default routing page. Adjust the order (or priority) of the settings on this page:
- Click Reorder next to the setting.
- Enter the new number. For example, enter 1 to assign the highest priority.
- Click Save.
- Repeat these steps for assigning other priority numbers to settings.
Settings with a Reject action are always assigned the highest priority. This is true even when you've configured another setting with a higher priority.
Important: Google Workspace applies all routing settings to the affected inbound messages. If two settings conflict, Google Workspace applies the setting with the higher priority and ignores the lower priority, conflicting setting.
Google, Google Workspace, and related marks and logos are trademarks of Google LLC. All other company and product names are trademarks of the companies with which they are associated.