possible to resolve DNS based on URL path

dns, http, url-routing

Solution

That can't be done; DNS' name to IP resolution only considers the hostname.

You could achieve a similar result by hosting a reverse proxy like nginx at`example.com`, and then direct queries for `/a` to `100.100.100.100` and for `/b` to `200.200.200.200`.

Problem

My understanding is that there are certain advantages to putting two related sites under the same domain, as opposed to separate subdomains (for example sub-sites for different book genres). Two I can think of are using the same SSL cert, and SEO rankings. I'd like to have different paths for the same domain resolve to different IP addresses. For example `example.com/a` to `100.100.100.100` and `example.com/b` to `200.200.200.200`. I know this isn't possible with traditional DNS servers, but are there other techniques or commercial services out there that would accomplish this? Ideally I'd be also able to dynamically change where the paths resolve to as well, as different servers come on or offline.

Original source