DNS translates domain names into information clients need to reach services. A small record error can take a website or email service offline. Understanding record purpose, authoritative nameservers, and caching helps distinguish an incorrect zone from propagation delay.
Before You Begin
- Access to the domain’s authoritative DNS provider.
- The correct target values from the hosting, mail, or verification provider.
- A record of existing DNS entries before making changes.
Recommended Approach
1. Confirm authoritative nameservers
Check the domain’s registrar delegation and identify which DNS provider is authoritative. Editing a zone at a provider that is not authoritative will not change public answers.
2. Create web records
Use an A record for an IPv4 address and AAAA for IPv6. Use a CNAME when a hostname should alias another hostname, subject to DNS provider rules for the zone apex. Avoid conflicting records at the same owner name.
3. Configure mail and verification
Add MX records with the correct priorities for inbound mail. Add TXT records for SPF, DKIM, DMARC, and service verification exactly as instructed by the provider. Be careful not to create multiple SPF records at the same name.
4. Set TTL intentionally
A shorter TTL can make planned changes easier to roll out but increases query volume. A longer TTL can reduce repeated lookups but makes changes remain cached longer. Lower TTL ahead of a planned migration when appropriate.
5. Verify authoritative and recursive answers
Query the authoritative nameserver, then query multiple public recursive resolvers. Check for typos, trailing dots where required, wrong record types, and stale cached answers.
Operational Considerations
Network changes should be made from a documented traffic requirement rather than from a guess about which port might be needed. Record the source, destination, protocol, port, route, and security zone for each required flow. Keep a known-good configuration backup and a recovery path outside the network segment being changed. When possible, stage policy changes and test them during a maintenance window with someone available to verify application behavior.
How to Verify the Result
Troubleshoot one layer at a time: link and interface state, IP address and subnet, default route, DNS resolution, path reachability, firewall decision, and application listener. Capture the exact source and destination addresses and ports. A failed ping or one traceroute timeout is not conclusive; test the actual application protocol and review firewall or device logs to identify where the connection is being dropped.
Example Configuration
Illustrative example — adapt values to your environment
# Query common record types
dig example.com A
dig example.com AAAA
dig example.com MX
dig example.com TXT
dig example.com NS
Common Mistakes to Avoid
- Do not delete existing MX, TXT, or CAA records without understanding their purpose.
- DNS changes are not instantaneous because resolvers cache answers according to TTL and negative caching rules.
- A CNAME generally cannot coexist with other record types at the same owner name.
Make one change at a time, test it from the perspective of the actual user or application, and record the reason for the change. Keep a rollback path for network, identity, and production configuration changes.
Final Checklist
- The configuration matches the intended environment and service version.
- Access is limited to the required identities, resources, ports, and operations.
- The expected workflow has been tested, including a negative test for unauthorized access.
- Secrets and temporary credentials are protected and excluded from logs and source control.
- The configuration owner, purpose, and review or expiration date are documented.