3

Example:
Root - https://stackoverflow.com --> Direct to ns1.nameserver1.com
A specific path - https://stackoverflow.com/somepath -->Direct to ns3.nameserver3.com
All other path - https://stackoverflow.com/* (wildcard) --> Direct to ns2.nameserver2.com

Can this be achieve via DNS records?

  • Can you clarify your question, please? You ask about "different path of a domain", but in all three of your examples, the domain is the same. Obviously, if the domain is the same, there is no way for the name server to distinguish them, so it cannot possibly handle them differently. Also, what do you mean by "direct"? – Jörg W Mittag Jun 6 at 7:39
  • 4
    Those are URLs, not domains – Hagen von Eitzen Jun 6 at 13:39
20

No. As the URL path is not part of the domain name, it is not known by the resolver when deciding which nameservers to use, and it is not known by the nameserver when deciding what DNS records to return.

The path is only known by the web server (after TLS handshake and HTTP request), and at this point the web server can respond with HTTP redirects to a different URL, or it can itself "reverse-proxy" the original requests to various backend servers based on path.

| improve this answer | |
  • 3
    Might be worthwhile to note that subdomains can have different records, and that the server can pull pages from other servers (though still supplying the pages itself and acting as a middle man). – Ben Jun 5 at 20:17

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.