Before You Start: Two Things You Need
Before touching your DNS, get these from your web host:
- Your host's IP address — a numeric address like
157.230.75.22. Found in your hosting control panel, welcome email, or by contacting your host's support. This is what you'll put in your A record. - OR: a CNAME target — a domain name like
yoursite.vercel.appormystore.myshopify.com. Some platforms (Vercel, Shopify, Squarespace) give you a CNAME to point to instead of an IP.
If your host gave you an IP address, you'll create an A record. If they gave you a domain name, you'll create a CNAME record. Both are covered below.
Also recommended before any DNS change: Lower your TTL (Time to Live) to 300 seconds at your current DNS provider. Wait the current TTL period for existing records to expire from caches — then make your change. This means propagation takes 5 minutes instead of potentially hours.
Method 1: Update Your A Record (IP Address)
This is the most common method. You're adding a DNS record that says "when someone requests my domain, send them to this IP address."
Log into your DNS dashboard
This is either your domain registrar's DNS panel (Namecheap, GoDaddy) or a separate DNS provider (Cloudflare) if you've already delegated nameservers there. Find the "DNS Records" or "Advanced DNS" section for your domain.
Find and edit (or delete) the existing A record for @
Your domain already has an A record for @ (the root domain) — it's pointing to your old host's IP or a parking page. Edit it to your new host's IP, or delete it and create a new one.
Set the new A record values
The record should look like this:
Type: A
Name: @ (or leave blank — means root domain)
Value: 157.230.75.22 (your host's IP)
TTL: 300 (5 minutes — lower is faster propagation)
Save the record.
Add a www CNAME (optional but recommended)
Add a CNAME record so that www.yourdomain.com also works:
Type: CNAME
Name: www
Value: yourdomain.com (points www → root)
TTL: 300
Alternatively, some hosts want you to point www to their IP or CNAME directly — check their documentation.
Verify propagation
Go to dnschecker.org, type your domain, and check the A record. You should see your new IP appearing from most global locations within 5–15 minutes (if TTL was 300). Once it's green worldwide, your domain is pointed to your new host.
Method 2: Point to a CNAME Target (Vercel, Shopify, etc.)
Platforms like Vercel, Netlify, Shopify, Squarespace, and GitHub Pages give you a CNAME target instead of an IP. The process is similar, with one important note: you can't create a CNAME at the root domain (@) with most DNS providers. Options:
- Use Cloudflare's CNAME flattening: Cloudflare supports CNAME records at the root — they handle the flattening automatically. This is the cleanest solution.
- Use www as your primary domain: Point your root to your CNAME's IP (via A record) and make www your CNAME. Then 301-redirect @ → www at the hosting level.
- Follow your platform's specific instructions: Vercel, Shopify, and others have their own documentation for custom domain setup that handles this edge case.
Type: CNAME
Name: www (or @ if using Cloudflare)
Value: cname.vercel-dns.com (your platform's CNAME target)
TTL: 300
Method 3: Delegate Nameservers to Your Host
Some hosts (especially shared hosting providers like Bluehost, SiteGround, or Hostinger) prefer that you point your domain's nameservers directly to them instead of managing individual DNS records. This is the "all-in-one" approach: they control your DNS entirely.
To use this method, you update your NS records at your registrar to point to your host's nameservers. Your host then manages all your DNS records from their control panel.
Caution: Switching nameservers replaces ALL your DNS records with whatever your host has configured. Before switching, export your existing DNS records (especially MX/email records) from your current provider so you can recreate them at your new host. This is the most common cause of email going down after a hosting migration.
# Done at your registrar (not at your current DNS provider)
NS1: ns1.siteground.net
NS2: ns2.siteground.net
# Your host gives you their specific nameservers
Registrar-Specific Instructions
The steps are the same everywhere; here's where to find the DNS panel in each major registrar:
Cloudflare (Recommended)
- Log in at dash.cloudflare.com
- Select your domain from the dashboard
- Click DNS in the left sidebar
- Click Add record or edit an existing one
- Select type (A or CNAME), set Name to
@, enter your value - Save. Changes propagate in ~5 minutes.
Note: If you want to use Cloudflare as your DNS provider but your domain is at another registrar, add your domain in Cloudflare, then update the NS records at your registrar to Cloudflare's nameservers (ns1.cloudflare.com, ns2.cloudflare.com or whatever Cloudflare assigns).
Namecheap
- Log in → Domain List
- Click Manage next to your domain
- Click the Advanced DNS tab
- Under "Host Records," click Add New Record
- Select A Record, Host =
@, Value = your IP, TTL = 5 min - Save changes
GoDaddy
- Log in → My Products → find your domain → DNS
- Scroll to "DNS Records"
- Edit the existing A record for
@(click the pencil icon) - Change the Value to your new host's IP
- Set TTL to 600 seconds (GoDaddy's minimum)
- Save. GoDaddy propagation typically takes 30–60 minutes even with a short TTL.
Porkbun
- Log in → Account → Domain Management
- Click the domain → DNS Records
- Find the A record for your domain and click the edit (pencil) icon
- Update the IP address, set TTL to 300
- Save
Troubleshooting
My site still shows the old host after 30+ minutes
Check your TTL. If it was set to 86400 (24 hours) before you made the change, some resolvers will cache the old record for up to 24 hours. Use dnschecker.org to see what different nameservers around the world are returning — if they're returning your new IP, the issue is your local ISP's resolver caching. Try clearing your local DNS cache or using 1.1.1.1 temporarily.
My email stopped working after the switch
You likely overwrote your MX records during the switch. Log into your new DNS provider and recreate the MX, DKIM (TXT), and SPF (TXT) records from your email provider (Google Workspace, Microsoft 365, etc.). Your email provider's documentation has the exact records to add.
www works but the root domain doesn't (or vice versa)
You have an A record for one but not the other. Add a CNAME pointing www → your root domain (or an A record pointing www to your host's IP). Make sure your host is configured to respond to both.
I'm getting an SSL/certificate error
SSL certificates are often issued for a specific domain or set of domains. After pointing your DNS to a new host, you may need to reissue or install the SSL certificate at the new host. Most modern hosts (Vercel, Hostinger, SiteGround, etc.) auto-issue Let's Encrypt certificates once your DNS is pointing to them — this typically takes 5–15 minutes after propagation.
Summary Checklist
- ☐ Get your host's IP address or CNAME target from your hosting panel or welcome email
- ☐ Lower TTL to 300 at your current DNS provider and wait for old TTL to expire
- ☐ Update A record for
@to new IP (or CNAME for platform hosts) - ☐ Update/add www record
- ☐ Verify MX/email records are still in place
- ☐ Verify with dnschecker.org that the new IP is propagating
- ☐ Confirm SSL certificate issued at new host
- ☐ Raise TTL back to 3600 once everything is verified