Moving Servers: Updating DNS Records
When moving servers, it's essential to update the DNS records to ensure that the website continues to function correctly. This article will provide a detailed context on this topic, covering key concepts and subtopics.
Subdomains and Wildcard DNS Records
Subdomains are a part of a domain name that precedes the main domain name. For example, "blog.example.com" is a subdomain of "example.com". Wildcard DNS records allow a single DNS record to match any subdomain within a domain. For instance, a wildcard DNS record for "*.example.com" would match "blog.example.com", "store.example.com", and so on.
Updating DNS Records
To update DNS records when moving servers, you'll need to edit the existing records or create new ones. In the example provided, the initial records looked something like:
*.example.com 192.0.2.0 @.example.com
sub.example.com 192.0.2.0
...
Removing Subdomain DNS Wildcard
If you want to remove the wildcard DNS record, you'll need to replace it with specific records for each subdomain. For example, to remove the wildcard record for "*.example.com", you might create records like:
blog.example.com 192.0.2.1
store.example.com 192.0.2.2
...
Adding a New Server
If you're adding a new server, you'll need to create new records for the new server's IP address. For example:
newserver.example.com 192.0.2.3
*.newserver.example.com 192.0.2.3
Propagation Time
After making these changes, it may take some time for the DNS changes to propagate across the internet. This process can take anywhere from a few minutes to several hours.
- Update DNS records when moving servers
- Replace wildcard records with specific subdomain records
- Create new records for new servers
- Allow time for DNS changes to propagate
References
- Book: DNS and BIND, Paul Albitz and Cricket Liu
- Article: How to Create and Manage DNS Records with dig
- Online Resource: What is DNS?