Prerequisites
Before adding an MX record, make sure you have:
- Access to HestiaCP control panel
- A domain added in HestiaCP with DNS service enabled
- Mail server information (if using external email service)
What is an MX Record?
MX (Mail Exchange) records specify which mail servers should receive email for your domain. Priority numbers determine order (lower = higher priority).
Step 1: Log in to HestiaCP
Access https://YOUR_SERVER_IP:8083 and log in.
Step 2: Navigate to DNS Section
Click on DNS in the top menu bar.
Step 3: Select Your Domain
Click on the domain name you want to manage.
Step 4: Click "Add DNS Record"
Click the green + Add DNS Record button.
Step 5: Configure the MX Record
Fill in the details:
- Record Name: Leave empty (for root domain) or enter @
- Record Type: Select MX from dropdown
- IP Address: Enter the mail server hostname (e.g.,
mail.example.com,aspmx.l.google.com) - Priority: Enter priority number (e.g., 10, 20, 30)
Example: Google Workspace (Gmail) MX Records
Priority 10: aspmx.l.google.com
Priority 20: alt1.aspmx.l.google.com
Priority 30: alt2.aspmx.l.google.com
Priority 40: alt3.aspmx.l.google.com
Priority 50: alt4.aspmx.l.google.com
Example: Microsoft 365 MX Record
Priority 10: example-com.mail.protection.outlook.com
Example: Local HestiaCP Mail Server
Priority 10: mail.yourdomain.com
Step 6: Add Multiple MX Records
For redundancy, add multiple MX records with different priorities:
- First MX record: Priority 10
- Second MX record: Priority 20
- Third MX record: Priority 30
Verify MX Records
dig @YOUR_SERVER_IP example.com MX
nslookup -type=MX example.com
✅ MX record has been added successfully!