I have a situation where we need to point a sub domain to a different hosting provider.

The main website www.mainwebsite.example is being hosted with HostingProvider1 and now we have another application www.example.com which is hosted with HostingProvider2. We want this application to be accessible only via www.mainwebsite.example/application

I am not sure how this can be done at DNS level. Our main domain which is www.mainwebsite.example is hosted with Network Solutions, I am not sure if I can make www.mainwebsite.example/application on DNS level to point to a different hosting provider.

If it was application.mainwebsite.example then it would be simple as I can change the CNAME record. But in this case the client wants www.mainwebsite.example/application to point to different hosting.

Not sure if this is possible only at DNS level.

  • Why not just redirect mainwebsite.com/application to example.com – Steve Jul 30 '18 at 7:50
  • I wish it was that easy, But requirement is from client he want subfolder to point to different hosting provider – Learning Jul 30 '18 at 7:51
  • It can't be done at the DNS level. It can only be done using a reverse proxy. – Stephen Ostermiller Jul 30 '18 at 10:16
  • I am not sure what reverse proxy is – Learning Jul 30 '18 at 10:17