---
title: "Reducing DNS propagation time"
date: "2014-10-28"
category: "dns"
slug: "reducing-dns-propagation-time"
---

Standard DNS propagation can take up to 24 hours, but with proper planning you can reduce the effective switchover time to 60 seconds or less. This process requires a basic understanding of DNS records and approximately 5 days to complete with minimal downtime.

## Step-by-Step Process

1. **Set up your new account** but keep your existing hosting active with the old provider.

2. **If you can modify DNS TTL values on your old host**, set all record TTLs to `60` seconds and skip to step 4.

3. **If you cannot modify TTL values**, replicate your current DNS records on the new host. You will need the A records for your website and mail server, plus MX records for email delivery. Look up these values using [dig](http://en.wikipedia.org/wiki/Domain_Information_Groper) or a web tool like [DNS Records on Network-Tools](http://network-tools.com/default.asp?prog=dnsrec&host=%20Network-Tools).

4. **Configure DNS on the new host with old IP addresses:**
    - Look up the `A` record for your domain (e.g. `apnscp.com`) and the `www` subdomain (e.g. `www.apnscp.com`)
    - In **DNS** > **DNS Manager**, replace the A records with the old IP addresses
    - Change the TTL from the default (`86400` seconds / 1 day) to `60` seconds
    - For any additional subdomains (e.g. `mail.apnscp.com`, `forums.apnscp.com`), add their A records as well. You can use a wildcard `A` record (`*`) to catch all subdomains not explicitly defined
    - Change nameservers to `ns1.apnscp.com` and `ns2.apnscp.com` through your domain registrar, then wait 48 hours for nameserver changes and the new TTL values to propagate

5. **Note your new server's IP address** from the control panel under **Account** > **Summary** > **General** > **IP Address**. Both the web server and mail server use this address.

6. **Switch to the new IP address** (2-3 days after step 4): In **DNS** > **DNS Manager**, replace all old IP addresses with your new server's IP and set TTL values back to `86400` seconds. At this point, the propagation window is only 60 seconds instead of 24 hours. Ensure your site is fully configured before making this change, as it will be live immediately.

## Example

Migrating `apnscp.com` from another host. Current DNS records (from [network-tools.com](http://network-tools.com/default.asp?prog=dnsrec&host=apnscp.com%20network-tools.com)):

- `apnscp.com` and `www.apnscp.com`: A record `4.2.12.250`
- `apnscp.com` MX record: `mail.apnscp.com` with priority `10`
- `mail.apnscp.com`: A record `4.2.12.250`

Steps in the **DNS Manager**:

1. Set the A records for `www.apnscp.com` and `apnscp.com` to `4.2.12.250`
2. Set TTL to `60` for both A records
3. Set the MX record for `apnscp.com` to `mail.apnscp.com`
4. Create or update the A record for `mail.apnscp.com` to `4.2.12.250`
5. Change nameservers to `ns1.apnscp.com` and `ns2.apnscp.com`
6. After 48 hours, replace all occurrences of `4.2.12.250` with the new account IP (e.g. `64.22.68.61`)

## See Also

- [[dns-work]]
