How to Configure DNS for Hosting
How to Configure DNS for Hosting
DNS (Domain Name System) translates your domain name into an IP address that browsers use to load your website. Proper DNS configuration is essential for your website, email, and other services to work correctly.
DNS Record Types
| Record Type | Purpose | Example |
|---|---|---|
| A | Points a domain/subdomain to an IPv4 address | @ → 192.0.2.1 |
| AAAA | Points a domain/subdomain to an IPv6 address | @ → 2001:db8::1 |
| CNAME | Creates an alias pointing to another domain | www → yourdomain.com |
| MX | Directs email to mail servers | @ → mail.yourdomain.com (priority 10) |
| TXT | Stores text data (SPF, DKIM, verification) | @ → v=spf1 +a +mx ~all |
| NS | Specifies authoritative nameservers | @ → ns1.hosting.com |
| SRV | Defines service locations (SIP, XMPP) | _sip._tcp → sip.example.com |
| CAA | Specifies authorized certificate authorities | @ → 0 issue "letsencrypt.org" |
Option 1: Use Your Hosting Provider’s Nameservers
The simplest approach — delegates all DNS management to your hosting provider.
- Log into your domain registrar’s control panel.
- Find the Nameserver settings for your domain.
- Replace existing nameservers with 10Corp’s nameservers (provided in your welcome email).
- Save changes. Full propagation takes 24–48 hours.
Advantage: All DNS records are managed in one place (cPanel’s Zone Editor). Disadvantage: If you change hosting, you need to update nameservers again.
Option 2: Configure Individual DNS Records
Keep DNS at your registrar and point specific records to your hosting.
Essential records for hosting:
Type: A | Host: @ | Value: YOUR_SERVER_IP | TTL: 3600
Type: A | Host: www | Value: YOUR_SERVER_IP | TTL: 3600
(or)
Type: CNAME | Host: www | Value: yourdomain.com | TTL: 3600
For email hosted on the same server:
Type: MX | Host: @ | Value: yourdomain.com | Priority: 0 | TTL: 3600
Type: A | Host: mail| Value: YOUR_SERVER_IP | TTL: 3600
Type: TXT | Host: @ | Value: v=spf1 +a +mx ~all | TTL: 3600
Managing DNS in cPanel
If your nameservers point to your hosting, manage DNS in cPanel:
- Go to Domains > Zone Editor.
- Click Manage next to your domain.
- Add, edit, or delete DNS records as needed.
- Click Save Record after each change.
DNS Propagation
After making DNS changes:
- TTL (Time to Live) determines how long records are cached. Lower TTL = faster propagation.
- A records typically propagate within 1–4 hours (depending on TTL).
- Nameserver changes can take 24–48 hours for full global propagation.
- Check propagation status at whatsmydns.net or dnschecker.org.
Common DNS Configurations
Website on hosting + Google Workspace email:
A @ YOUR_SERVER_IP
CNAME www yourdomain.com
MX @ aspmx.l.google.com (Priority 1)
MX @ alt1.aspmx.l.google.com (Priority 5)
MX @ alt2.aspmx.l.google.com (Priority 5)
TXT @ v=spf1 include:_spf.google.com ~all
Website on hosting + Microsoft 365 email:
A @ YOUR_SERVER_IP
CNAME www yourdomain.com
MX @ yourdomain-com.mail.protection.outlook.com (Priority 0)
TXT @ v=spf1 include:spf.protection.outlook.com ~all
Troubleshooting
- Website not loading after DNS change: Wait for propagation. Flush local DNS cache.
- Email not working: Verify MX records are correct and fully propagated.
- SSL certificate fails: AutoSSL requires DNS to point to the server. Wait for propagation and retry.
- Conflicting records: Don’t have a CNAME and A record for the same hostname.
For DNS configuration help, contact 10Corp support.