DNS Records: A Crucial Tip for Smooth Updates
When managing DNS records, there's an essential but often overlooked step: always double-check the MX and SPF records. Ignoring this can lead to significant disruptions, especially for email services.
Why is this important?
Before cloud solutions like Office365 and G Suite (now Google Workspace) became prevalent, many businesses hosted their emails on-premises, on a dedicated cloud VM, or through cPanel. In many cases—unfortunately for those involved—emails, websites, and even DNS were hosted on the same server.
This setup often included configurations like:
A Record:
A basedomain.com <OLDwebsiteIP>
CNAME Record:
CNAME www.basedomain.com basedomain.com
MX Record:
MX basedomain.com
The last line creates a fragile system where updating the main A record (e.g., pointing to a new website) would also disrupt email functionality. A misstep here can lead to downtime, lost emails, and operational headaches.
Best Practices for Updating DNS Records
To prevent disruptions, follow this step-by-step process:
Lower the TTL:
Reduce the TTL (Time-To-Live) for the A record and MX record to 300 seconds the day before making changes. This ensures updates propagate quickly.Create a New A Record:
Add a record such asA mail.basedomain.com <OLDwebsiteIP>
.Update the MX Record:
Point the MX record toMX mail.basedomain.com
.Verify Record Changes Locally:
Use tools likedig
ornslookup
to confirm your local machine reflects the updated records.Test Email Functionality:
Ensure the client can still receive emails after the change.Update the A Record:
Once the TTL expires, update the main A record to point to the new website.Restore TTL Values:
A few days later, increase the TTL values back to their usual settings.
Recommended DNS Tools
For smooth troubleshooting and record validation, consider these tools:
ezdig and ezwhois: GUI-based tools for
dig
andwhois
commands on Windows (ezTK).What's My DNS: A great site for checking DNS propagation status (What's My DNS).
Watch Out for SPF Records
SPF (Sender Policy Framework) records have become a standard for preventing email spoofing. However, these can cause issues during migrations or updates if improperly configured. For instance, a new web host's mail relay might get blocked due to SPF restrictions.
Useful Resources:
Learn about SPF records: Cloudflare's Guide to SPF
Validate your SPF syntax: SPF Syntax Validator
Handling DNS updates might seem straightforward, but overlooking MX and SPF records can cause significant disruptions. By following best practices and leveraging the right tools, you can ensure a seamless transition with minimal downtime.
It's important to understand how DNS works, mainly how to use a WHOIS to find where the nameservers are, how to lower TTLs, and how to ensure you update records safely without impacting emails AND while not running afoul of a strict SPF policy.
If you’re ever unsure about how DNS works in relation to a project you're working on, don't be afraid to ask - DNS admin panels are often a bit counter-intuitive and two sets of eyes over critical actions is a good thing. James Anthony Consulting is here to help!