Custom Return Path

Set a custom return path for your domain.

When a Resend user adds a new domain, we generate DNS records for the domain. These records include a SPF record and a MX record and authorize Resend to send emails from the domain.

Until today, the host name for these records followed a hard-coded pattern: send.yourdomain.tld.

Return path conflicts

While this hard-coded pattern worked for most cases, some Resend users already have existing send.yourdomain.tld for other services or integrations.

Attempting to add another set of records at the same location resulted in conflicts. For multi-tenant apps registering domains for their customers, our hard-coded pattern was not flexible enough.

Set a custom return path

Today we're excited to announce you can optionally set a custom return path for your domain. The custom return path is used for SPF authentication, DMARC alignment, and handling bounced emails.

Set a custom return path via the Resend dashboard.

Or set a custom return path via the API.

import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
resend.domains.create({ name: 'example.com', customReturnPath: 'outbound' });

Key details

The return path subdomain defaults to send (i.e., send.yourdomain.tld).

Custom return path subdomains must adhere to the following rules:

  • Must be 63 characters or less
  • Must start with a letter, end with a letter or number, and contain only letters, numbers, and hyphens

Avoid setting values that could undermine credibility (e.g. testing), as they may be exposed to recipients in some email clients.

Conclusion

We look forward to seeing how custom return paths provide additional flexibility when creating domains.