DNS (Domain Name System) is the system that translates domain names such as wp-agency.uk into IP addresses that computers use to find one another on the internet. Without DNS you would need to remember a numerical IP address for every website.
How does DNS work?
When you type a domain name into your browser, the DNS system goes through a number of steps:
- DNS query β Your browser asks a DNS server: βWhich IP address belongs to wp-agency.uk?β
- Name servers β The query is forwarded to the name servers responsible for the domain.
- DNS records β The name server looks up the correct record (usually an A record) and sends the IP address back.
- Connection β Your browser connects to the web server at that IP address and loads the website.
This entire process typically takes less than 100 milliseconds.
Important DNS records
| Record | Function |
|---|---|
| A record | Links a domain to an IPv4 address |
| CNAME | Points a subdomain to another domain |
| MX record | Determines which mail server receives email |
| TXT record | Contains text information, often for SPF and DKIM |
DNS and your WordPress website
DNS settings are crucial when setting up a WordPress website:
- Linking your domain to hosting β Via A records or name servers you point your domain to your web server.
- Setting up email β MX records determine where your email is delivered.
- Activating SSL β Some SSL validations require a DNS record.
- Redirects β When migrating a domain you reconfigure DNS to send visitors to the correct server.
- Enabling a CDN β A Content Delivery Network often requires a CNAME change in your DNS.
DNS changes can take up to 48 hours to propagate worldwide (DNS propagation). Therefore, always plan domain changes well in advance.