Setting Up MX Records for Email
MX (Mail Exchange) records tell the internet where to deliver email for your domain. Without properly configured MX records, you will not receive any email sent to addresses at your domain.
How MX Records Work
When someone sends an email to you@yourdomain.com, the sending mail server looks up the MX records for yourdomain.com. The MX records specify which mail servers handle email for that domain and in what priority order.
Adding MX Records in DirectAdmin
- Log in to DirectAdmin and navigate to DNS Management.
- Select your domain and click Add Record.
- Set the Type to
MX. - In the Name field, enter
@(for the root domain). - In the Value field, enter the mail server hostname (e.g.,
mail.yourdomain.com.). - Set the Priority (lower numbers = higher priority, e.g., 10).
- Click Save.
Common MX Record Configurations
SillyHost Email
@ MX 10 mail.yourdomain.com.
Google Workspace
@ MX 1 ASPMX.L.GOOGLE.COM.@ MX 5 ALT1.ASPMX.L.GOOGLE.COM.@ MX 5 ALT2.ASPMX.L.GOOGLE.COM.@ MX 10 ALT3.ASPMX.L.GOOGLE.COM.@ MX 10 ALT4.ASPMX.L.GOOGLE.COM.
Microsoft 365
@ MX 0 yourdomain-com.mail.protection.outlook.com.
Understanding Priority Values
The priority (or preference) value determines the order in which mail servers are tried:
- Lower numbers are tried first (higher priority).
- If the primary server is unavailable, email is delivered to the next server in priority order.
- Servers with the same priority receive email in a round-robin fashion.
Important Notes
- When switching email providers, update your MX records and remove the old ones.
- MX records typically propagate within 1 to 12 hours.
- Ensure a corresponding A record exists for your mail server hostname.