I have a subdomain, say sub.A.com

I would like this to be pointed to B.com/folder

With A.com I am only able to change the DNS records since it's hosted on an eCommerce platform.

With B.com I can change any parameter since I host it.

A simple 301 redirect from sub.A.com won't do because I don't want people to see B.com when they go to sub.A.com.


If you have full control over B.com, you could do this:

  1. Point the subdomain sub.A.com to the IP of B.com in the DNS A-record (and AAAA-record, if you use IPv6).
  2. Add a virtual Host, server name alias or whatever is appropriate at the server for B.com that delivers the content from folder ${DocumentRoot of B.com}/folder when a request for sub.A.com comes in.

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.