1

DNS requests to different subdomains can be different. For example, example.com and subdomain.example.com can return different IP addresses.

Does this logic extend to the parts of the domain after the TLD? (I don't know what this part of the URL is called.) Can the DNS lookup for example.com be different than the lookup for example.com/part2 ?

When a DNS lookup is requested, the desired domain name is obviously sent to the DNS server. When a site like example.com/part2 is requested, what information does the DNS server receive? Does the DNS server know the user is requesting the part2 portion of the domain, or is this computed on the end-user's device?

Related: How is a subdomain passed to the webserver?

Related: What does a DNS request look like?

2

DNS server doesn't know the complete URL, just the host part. So DNS lookup results don't depend on "/part2" or anything like that.

However is is possible to configure multiple IP addresses per host at DNS zone. So DNS client can receive the same list each time, but with different first IP.

And there are DNS servers for very big sites like F5 Big-IP, which can return only 1 IP each time, and each time different (based on chosen algorithm).

So if you're interested, if you have any warranty that you'll always get the same IP address for the same host - then no.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.