Whether you're hosting your website on an external VPS here’s how to configure DNS properly — including keeping email on your current hosting (e.g., cPanel).
SCENARIO 1: Website on VPS, Email Stays on Current Server (e.g., cPanel)
Goal:
-
Point website (www and root domain) to your external VPS
-
Keep email services (like Roundcube, Webmail) working from your current cPanel host
Step 1: Get Your VPS IP
-
Ask your VPS provider or check your server panel for the IP address (e.g.,
123.123.123.123)
⚙️ Step 2: Update A Records in DNS
Update only A records for web access:
| Type | Name | Value |
|---|---|---|
| A | @ | 123.123.123.123 ← your VPS IP |
| A | www | 123.123.123.123 ← same VPS IP |
✅ This points only the website to the VPS
✉️ Step 3: Leave MX Records and Email DNS as-is
Do NOT change the MX records if you want to keep your email on the current host.
Example:
| Type | Name | Value |
|---|---|---|
| MX | @ | mail.yourdomain.com |
| A | IP of current hosting server | |
| A | webmail | IP of current hosting server |
| A | cpanel | IP of current hosting server |
| CNAME | autoconfig | yourdomain.com or cPanel host |
✅ These settings ensure that email and webmail continue to work.
Step 4: Check Email Routing (Important!)
In cPanel > Email Routing, make sure to select:
“Local Mail Exchanger”
This tells the server to keep handling email locally.
Step 5: Test Everything
-
Website should load from your VPS
-
Email (
info@yourdomain.com) should still work via Webmail or mail client
DNS Example:
| Record Type | Host/Name | Points To / Value |
|---|---|---|
| A | @ | VPS IP (website) |
| A | www | VPS IP |
| MX | @ | mail.yourdomain.com (email host) |
| A | IP of cPanel or email host | |
| A | webmail | IP of cPanel or email host |
Summary: Keeping Web and Email Separate
| Component | Where it Lives | DNS Record Type | Points To |
|---|---|---|---|
| Website | VPS or external host | A ( @, www ) | VPS IP |
| cPanel/Netpoa server | MX, A (mail) | Original host | |
| Webmail | cPanel/Netpoa server | A (webmail) | Original host |
✅ Need Help?
If your domain is hosted with Netpoa, we can configure this for you.
Email: info@netpoa.com
WhatsApp: 0755 212 222
