Suppose I have a web app running on myhost.com with the paths myhost.com/foo and myhost.com/bar.
Is it possible to use DNS CNAME records to map foo.myhost.com to myhost.com/foo and bar.myhost.com to myhost.com/bar. So for example, the request to bar.myhost.com/baz will go to myhost.com/bar/baz?
This isn't possible with a CNAME, or generally with DNS level configurations, to my knowledge. You'll need a server to redirect or replace the URL location with your desired URL location.
This is possible with a CNAME: foo.myhost.com => bar.yourhost.net
But this is not: foo.myhost.com => bar.myhost.com/foo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With