I am soon to transfer a website to my server for a client. The site is currently at www.xxx.com. On there they have a third party app in a folder on the server at www.xxx.com/app/.

The app is massive, and won't fit on our server, so they want to keep it hosted where it is and just move the rest of the site to my server. But they want to keep the url the same.

So... www.xxx.com -----> My server www.xxx.com/app/ -----> Their server

Is there any way I can achieve this with DNS?

  • 3
    No. DNS provides a mapping between IP addresses and hostnames. "www.xxx.com/app/" is not a hostname. Use an http redirect. – user4556274 Aug 4 '16 at 10:32

Yes, that's possible in many cases, but not with DNS. Instead, you can setup this directory /app as a reverse proxy in your web server that then forwards the request to the original server.

I say "many cases", as some apps can make this difficult, e.g. if they work with absolute instead of relative links and path names.


No. DNS only cares about the hostname part. What you could do (in addition to the previous suggestion of a reverse proxy) would be to setup a subdomain app.xxx.com.

You could then setup redirect/rewrite rules so that www.xxx.com/app forwarded to app.xxx.com and on the original server requests to app.xxx.com are served from the app folder.

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.