Host site in subfolder but redirect with CNAME?

Posted on 2011-03-17
Medium Priority
Last Modified: 2012-05-11
Can I have a website that is hosted a folder down on the server, like example.com/awebapp, yet redirect it to another domain with DNS settings like CNAME?  The idea is that I'd like to use an existing domain name to host multiple sites in subfolders on that domain, like mystuff.com which is really hosted at example.com/mystuff, or somejunk.com really hosted at example.com/somejunk.

To make things even more complicated, is there anyway that those sites can be covered by one SSL cert, even while they're being 'aliased' or 'forwarded' or what have you?
Question by:theamzngq
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 57

Accepted Solution

giltjr earned 2000 total points
ID: 35169867
You could have a CNAME that points to example.com.  Say you have another domain, somethingelse.com, you could.  In the zone for somthingelse.com you do

www.somethingelse.com. CNAME example.com

You could still need to do http://www.somethingelse.com/awebapp, or if you were running something that supports virtual hosts (called host headers in IIS) you could just do http://www.somethingelse.com and set up the virtual  host so that the default directory is awebapp.

Or if you want to keep everything in the same domain you could.

awebapp.example.com. CNAME example.com.

Then setup a virtual host for awebapp.example.com so that it default directory is awebapp, then you could enter http://awebapp.example.com.

As for the SSL cert, that gets a bit more diffcult.  As long as every host name you want to use SSL for is in the same domain (example.com) you could get a wildcard cert that would cover *.example.com, but you still have to pay for the number of hosts names.  So if you have awebapp.example.com, mysite.example.com, aboutus.example.com, you would have 1 cert, but pay for 3 names.

Author Comment

ID: 35192580
thank you, that's very helpful

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a multi-homed DNS setup in windows, you can have issues with connectivity to the server that hosts the DNS services (or even member servers of your domain if this same DNS server is a DC). This is because windows registers all of its IPs…
Resolve DNS query failed errors for Exchange
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question