Migrating WordPress

Migrating WordPress: DNS Crash Course

DNS stands for Domain Name System, which is the mechanism that translates our fancy domain names into the IP addresses belonging to the servers, or networks, on the Net that power these sites.

This is article 2 of 7 in a series on Migrating WordPress sites.

When you request a domain by name, whether in your browser, by FTP, SSH, Telnet, email, or otherwise, your computer goes through a decision tree to figure out the location of the domain you requested and then directs you to the right IP address so the server can fill your request.

Domain Name Servers

Each registered domain should point to one or more DNS name servers, whose job it is to direct traffic for the domain.  It’s typical to have two, or more, name servers assigned per domain, so if one nameserver is unavailable the others can answer the DNS call and direct the domain’s traffic.

Name servers are usually given to you by the company in charge of managing your DNS: it could be your domain registrar, your web host, or a third-party DNS service like CloudFlare or NoIP (both excellent services).

Want to get geeky, read more about Name servers.

A simple whois query (domain lookup) will show you the name servers used for any public domain, which tells you who’s in charge of directing traffic for that domain – it’s not always who you expect.

Lookup a Domain’s whois using Command Line

Afraid of the command line?  Don’t be – it’s a really helpful and powerful tool.

On a Mac or Linux, open Terminal and type:

whois thedomainiwanttolookup.com

Using Windows? You can query whois information using the Windows command line too.

Either way, when you run a whois via command line, you’ll get a result formatted something like this:

Erics-MacBook-Pro:~ eric$ whois sewmyheadon.com

Whois Server Version 2.0

Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.

   Registrar: ENOM, INC.
   Whois Server: whois.enom.com
   Referral URL: http://www.enom.com
   Name Server: NS7.IVYCAT.NET
   Name Server: NS8.IVYCAT.NET
   Status: clientTransferProhibited
   Updated Date: 18-dec-2013
   Creation Date: 04-nov-2005
   Expiration Date: 04-nov-2014

>>> Last update of whois database: Mon, 30 Jun 2014 21:11:15 UTC <<<

NOTICE: The expiration date displayed in this record is the date the
registrar's sponsorship of the domain name registration in the registry is
currently set to expire. This date does not necessarily reflect the expiration
date of the domain name registrant's agreement with the sponsoring
registrar.  Users may consult the sponsoring registrar's Whois database to
view the registrar's reported date of expiration for this registration.

TERMS OF USE: You are not authorized to access or query our Whois
database through the use of electronic processes that are high-volume and
automated except as reasonably necessary to register domain names or
modify existing registrations; the Data in VeriSign Global Registry
Services' ("VeriSign") Whois database is provided by VeriSign for
information purposes only, and to assist persons in obtaining information
about or related to a domain name registration record. VeriSign does not
guarantee its accuracy. By submitting a Whois query, you agree to abide
by the following terms of use: You agree that you may use this Data only
for lawful purposes and that under no circumstances will you use this Data
to: (1) allow, enable, or otherwise support the transmission of mass
unsolicited, commercial advertising or solicitations via e-mail, telephone,
or facsimile; or (2) enable high volume, automated, electronic processes
that apply to VeriSign (or its computer systems). The compilation,
repackaging, dissemination or other use of this Data is expressly
prohibited without the prior written consent of VeriSign. You agree not to
use electronic processes that are automated and high-volume to access or
query the Whois database except as reasonably necessary to register
domain names or modify existing registrations. VeriSign reserves the right
to restrict your access to the Whois database in its sole discretion to ensure
operational stability.  VeriSign may restrict or terminate your access to the
Whois database for failure to abide by these terms of use. VeriSign
reserves the right to modify these terms at any time.

The Registry database contains ONLY .COM, .NET, .EDU domains and

Registry Domain ID: 246626484_DOMAIN_COM-VRSN
Registrar WHOIS Server: whois.enom.com
Registrar URL: www.enom.com
Updated Date: 2013-10-06 01:31:04Z
Creation Date: 2005-11-04 18:12:47Z
Registrar Registration Expiration Date: 2014-11-04 18:12:00Z
Registrar: ENOM, INC.
Registrar IANA ID: 48
Registrar Abuse Contact Email: abuse@enom.com
Registrar Abuse Contact Phone: +1.4252744500
Domain Status: clientTransferProhibited
Registry Registrant ID:
Registrant Name: ERIC AMUNDSON
Registrant Organization: IVYCAT WEB SERVICES
Registrant Street: PO BOX 1331
Registrant City: GIG HARBOR
Registrant State/Province: WA
Registrant Postal Code: 98335-3331
Registrant Country: US
Registrant Phone: +1.8008614004
Registrant Phone Ext: 1
Registrant Fax: +1.8885009610
Registrant Fax Ext:
Registrant Email: DOMAINS@IVYCAT.COM
Registry Admin ID:
Admin Organization: IVYCAT WEB SERVICES
Admin Street: PO BOX 1331
Admin City: GIG HARBOR
Admin State/Province: WA
Admin Postal Code: 98335-3331
Admin Country: US
Admin Phone: +1.8008614004
Admin Phone Ext: 1
Admin Fax: +1.8885009610
Admin Fax Ext:
Registry Tech ID:
Tech Organization: IVYCAT WEB SERVICES
Tech Street: PO BOX 1331
Tech State/Province: WA
Tech Postal Code: 98335-3331
Tech Country: US
Tech Phone: +1.8008614004
Tech Phone Ext: 1
Tech Fax: +1.8885009610
Tech Fax Ext:
Name Server: NS7.IVYCAT.NET
Name Server: NS8.IVYCAT.NET
DNSSEC: unSigned
URL of the ICANN WHOIS Data Problem Reporting System: http://wdprs.internic.net/
Last update of WHOIS database: 2013-10-06 01:31:04Z

As you can see, there’s a TON of useful info in the whois record, including:

  • Name and contact info for the Registrant, Administrator, Technical and Billing contacts on file for the domain.  It’s important to keep this info current and updated.
  • What name servers are responsible for directing the domain’s traffic.
  • Who is the current domain registrar.
  • When the domain was registered.
  • When the domain was last updated.
  • When the domain expires.

For the purposes of this tutorial, though, we’re most concerned with the DNS name servers responsible for directing traffic for the domain.  In the example above, the name servers are:

Name Server: NS7.IVYCAT.NET
Name Server: NS8.IVYCAT.NET

DNS Records

Once we know the name servers responsible for the domain, we know where we need to go to make changes to the domain’s DNS records if we need to redirect traffic.  Or, at least, we have a clue.

Ideally, there should be no question about who’s responsible for a domain’s DNS, right?  The domain owner should know who’s in charge of directing their domain’s traffic, but realistically, the majority of customers we encounter do not know.  And they feel powerless over their domains.  So, knowing how to quickly look up this info can save you, and your customers time.

Don’t recognize the name servers as belonging to a specific hosting company or service? Try popping them into Google and seeing if it yields clues.

For the purposes of this tutorial series and moving websites, we’re most concerned with DNS A records, which match domain names with IP addresses.  Although, note that some other DNS record types like CNAMES do not map to IP addresses but to other domains.

A typical DNS record looks something like this:

Example DNS Record
Example DNS Record

In the above example, web traffic is directed by the A record that reads:

wptestdomain.com.   14400  IN  A

Here’s a breakdown of each entry on that line:

  • wptestdomain.com. = this is the domain we’re working with.
  • 14400 = TTL (time to live)
  • IN = indicates it’s on the Internet
  • A, NS, MX, CNAME, TXT, SOA or others = the record type of DNS entry
  • = the IP address in charge of web traffic for wptestdomain.com.

Full list of DNS record types

If I were moving wptestdomain.com from it’s current location to the IP address, I’d move the site to the new location, verify everything’s working, and then switch the IP address in the above A record to:

wptestdomain.com.   14400  IN  A

Before migrating any site, I like to:

  1. Run a full DNS report to make sure I know where all traffic is currently pointing using a handy tool like: DNSStuff or intoDNS.
  2. Login to the existing DNS provider and note the existing DNS setup.  This is especially needed if you’re migrating DNS to a different provider by changing the domain’s name servers – you don’t want to lose any special DNS entries.

DNS Caching

When a site gets repeated traffic, the DNS information pairing the domain to the IP address where the site lives may be cached by your computer, a network server, your ISP, and even the root name servers themselves: the big DNS daddy-o’s in the cloud running the authoritative databases directing public domain traffic.

How long they cache DNS records depends upon the DNS record’s TTL values.

TTL Values in DNS

TTL stands for Time to Live and is a measurement in seconds of how long DNS servers can cache, or remember, the IP address associated with the DNS entry.  There are TTL values assigned to each entry in your domain’s DNS: web traffic, FTP, mail, CNAMEs (aliases), etc.

Pro tip: If you’re moving a site that’s already live from one server to another, try to lower the domain’s TTL values to 300 or 600 seconds (5 or 10 minutes), at least 24 hours prior to scheduled move.

This lets DNS servers know that your DNS may change every 5 or 10 minutes, so they need to re-check the location of the domain at least that often, and not cache the domain/IP pair for longer. This means that, once you re-point web traffic to the new IP, the DNS will propagate around the Net more quickly, so users will see the new site without waiting as long for their DNS providers to update their cache.

Not all DNS providers offer the same flexibility (or any, for that matter) in changing your domain’s TTL values.  If in doubt, search their knowledgebase or contact support.

Once your domain is moved and you’ve re-pointed DNS and verified that all is well in domain land, you can re-adjust your domain’s TTL values to more reasonable numbers, typically between 3600 and 14400 seconds (1 to 4 hours).

DNS and Patience

Once you make a DNS change, it takes time for the changes to propagate around the internet, so it’s best to know how long the TTL values are set to before you make the change, and be prepared to wait that long for your DNS changes to become visible to the rest of the Net.

Tools for Testing DNS

You can use tools like the following to see what IPs are cached for specific DNS entries.

Outside of that, grab a cuppa and be patient, young Jedi, the internet will catch up.

Next up: Trick your computer into thinking a domain belongs to a different IP address using your hosts file.

One response to “Migrating WordPress: DNS Crash Course”

  1. Eric Amundson Avatar

    Michele Smarty created a cool DNS lookup tool which is quite thorough: