The Domain Name System (DNS) converts hostnames such as www.example.com into information clients can use, such as an IP address.
A simplified lookup
- The visitor's device asks a recursive DNS resolver for the hostname.
- The resolver locates the domain's authoritative nameservers.
- The authoritative nameserver returns the requested record, such as an A or AAAA record.
- The browser connects to the returned destination.
DNS does not move website files. It tells clients where a hostname or service should be found. Changing a site's A record points the name somewhere else, while changing a domain's cPanel document root changes which local files the web server serves.