Can a domain name have both IP addresses (IPv6 and IPv4)

dnsdomain-nameipv4ipv6

Can a domain name (example.com) have both the IP addresses, IPv6 and IPv4?

Which IP address does a domain name have? IPv6 or IPv4? But I am not sure that it has both or any one at a time.

Best Answer

Sure. You have an A record (for IPv4) and an AAAA record (for IPv6). Typically the AAAA record gets resolved first, then the A record.

You can either have just an A name (for an IPv4-only host), AAAA name (IPv6-only host) or both. You could even have different servers for both.

You could even have multiple A and AAAA names (for different dual-stack or mix of ipv4 and 6) servers.