pointing one sub domain to another sub domain

Posted on 2007-12-02
Last Modified: 2010-04-07
I'd like to point one subdomain (i.e. at another subdomain (i.e.

Could someone help me figure out the best way to do this?
Question by:marglar
  • 5
  • 4

Expert Comment

ID: 20392352

It depends what you want to accomplish.

If you want the website from to display when you visit then I would use a http redirect. This means you need to host the domain in a hosting package.

The other option is to set up as a CNAME and set it to poin to

What type of server or hosting are you using?


Author Comment

ID: 20392376
I'm on a linux based host but I can't say for sure what the pointed domains (domain2) will be on.

I have an application that other companies want to use.  I need to host it but they want it to appear to be on their domain.  

I'll setup a copy of the application in a subdomain on my system and then have them (somehow) create a subdomain that points to my subdomain.

Can you show me what a cname record that would do this, would look like?

Thanks for the help!

Expert Comment

ID: 20392406
In that case, i recommend that you tell them the IP address for your system. That will be the same IP address as

If "" points to
you should tell them to point their subdomain to

That example would be using a normal A record which means, if you need to move your server or change your IP address, you'll need to tell the other company to change the IP address.
If you used a CNAME, then if you change your IP address, any DNS changes you make to would automatically copy over to

"A CNAME record maps an alias or nickname to the real or Canonical name which may lie outside the current zone. Canonical means expected or real name."


Author Comment

ID: 20392413
My subdomains will not have a separate ip address from my primary domain.  They are actually just sub-directories under the primary domain.

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!


Expert Comment

ID: 20392428
Thats fine.

So tell them either:-

1) to point their subdomain to the IP address of your primary domain
2) to create a CNAME pointed to your primary domain


Author Comment

ID: 20392451
Hi Dan.

I'm not sure I understand...   I need for them to point their subdomain to one of my subdomains..   Each client will have a subdomain in my domain and they'll want it to appear to be under their own domain/subdomain...


Expert Comment

ID: 20392465
Is your application a web application?

i.e. a website?

Author Comment

ID: 20392475
yes.   A copy of it will go in each subdirectory to be customized on a per-client basis.

Accepted Solution

DanJourno earned 250 total points
ID: 20392496
Ok, in that case you will have to do the following:-

Step 1
Since you only have one system and i guess one IP address for all the domains.....tell the other companies to point their subdomains to your primary domain using a CNAME, or to the IP address of your primary domain. I described this step above.

Step 2
Your hosting system will have host header settings. If you look your subdomain settings, you should find You will need to add to the host header for each sub domain. I can talk you through it with IIS/Windows but i cant tell you how to do it in Linux.


Just did a quick google search and found something interesting. Its not calling Host Header in linux. In apache, its called Name-based Virtual Host.  Some linux web servers dont support Host Headers.

Here is the documentation for Apache which might get your starts:-


Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Hiding a site page from being searchable 3 63
DNS Name Pointing 6 47
Clearing router cache 12 41
There have been a lot of times when we have seen the need to enter a large number of DNS entries in a forward lookup zone. The standard procedure would be to launch the DNS Manager console, create the Zone and start adding new hosts using the New…
Occasionally you run into the website or two that will not resolve properly using your own DNS servers.  Some people simply set up global forwarders for their DNS server.  I don’t recommend doing this because it can cause problems resolving addresse…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

867 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now