CNAME for a directory

Greetings experts,
I have been asked to provide the following for our web server.
A clients specific directory, we will call bigcompany, has a directory located on our webserver.  So when the client goes to the url:
The bigcompany directory has all the site pages, etc that most web hosting server do.  Now the client wants to use their own server for hosting but still have the original url:
Question: can this be configured using a CNAME?  If so what are the procedures.  I have configured a CNAME in the past but it was for a complete site not just a directory.  So previously i had something similar to this:
The url is which points via cname to  And the url is always listed in the url address bar.  So the end user never knows that the site is on a different server.
Thanks of the help.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You were able to use a DNS solution in the other case because you were forwarding a subdomain.  This won't work with a folder.  However, you can accomplish this by setting up a virtual directory on your web server within the website that points the bigcompany directory to their own web server.  Essentially, DNS will continue to refer traffic to your web server, but the content for that particular folder will come from their web server.

How to do this depends on what server platform you are using.  So, what are you using - Windows/IIS? Linux/Apache? Something else?

For the record, I don't think this is an ideal solution.  For one thing, they will have two points of failure - if either web server goes down, their site will be unavailable.  It also results in more traffic and less efficiency.  It would be much preferable for them to get their own domain name (ie. or to use a subdomain (ie.  If they used their own domain name, you could put a permanent redirect on your website forwarding to  You could leave the redirect in place as long as necessary to get the new domain name established.  If they used a subdomain, you could then use DNS to point to your IP address and to their IP address.  Again, you could set up a permanent redirect from to until people got the idea and updated their bookmarks, etc.
EaglePressAuthor Commented:
Thanks for the quick response.
I FULLY agree with your opinion on the "for the record" portion of the response.  But the solution I outlined is what was requested so I must make it happen.  But for the record (on my part) it does cause more administrative headaches, more network traffic and slower performance.
We are using an apache web server.  I have never tried to confiure a virtual directory using apache, but have done this many times using IIS 5 & 6.  If you have any suggested guideline for configuring the apache virtual directory, i would greatly appreciate the assistance.
"But the solution I outlined is what was requested so I must make it happen."
I understand the situation - have been in it myself.

Unfortunately, I'm not that experienced with Apache, so I wouldn't want to advise you on this.  Periwinkle is the resident Apache expert in this TA and should be along soon.  I'm sure he'll be able to give you the details.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Thanks Andrew - I'm here, even if I'm a 'she', and not a 'he' ;) ....

If I understand correctly, your client wants to 'forge' the urls to be on your server, when in fact they are actually coming from their own.  

I suppose you could use a framing technique to frame the content under - that way, the only url that they'd see would be, unless, of course, they viewed the source, which would tell them where it was coming from.  An example of this would be: 

... this user has their domain hosted on a server, but delivers the content from another server.

Probably a bit more satisfying would be to use a reverse proxy  through mod_proxy:

From that page:

"A reverse proxy" ... "appears to the client just like an ordinary web server. No special configuration on the client is necessary. The client makes ordinary requests for content in the name-space of the reverse proxy. The reverse proxy then decides where to send those requests, and returns the content as if it was itself the origin."


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Oops.  Sorry.  Evidently, periwinkle is also our resident gender expert as well.  My face is red.
lol - it's a common mistake, and not one that I get upset over - not many female software engineers, even these days.
EaglePressAuthor Commented:
Thanks...I will give that a try.  I have also proposed another option to management.  I will keep you informed.
EaglePressAuthor Commented:
Thanks for the input.  My second proposal (option) to management worked.  Here is what I did, just in case, anyone needs feedback.
Established a CNAME from our DNS to the other website name, not ip address.  Figured the registered domain name would be better in case the company ever changed ISP and received a new set of ip addresses.
Next the offiste company created a directory to host their site.
I registed a new domain name just for this and other sites that we will provide for future use.  This is the main reason for having the offsite server set up a directory instead of an actual dedicated site.
so now, if a user keys: they will actually go to www.offsiteservername/directoryname but the url will show
I will split the points as all had some real good hints.  Thanks for the input.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.