Solved

pointing one sub domain to another sub domain

Posted on 2007-12-02
11
231 Views
Last Modified: 2010-04-07
I'd like to point one subdomain (i.e. sub.domain1.com) at another subdomain (i.e. sub.domain2.com).

Could someone help me figure out the best way to do this?
0
Comment
Question by:marglar
[X]
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
  • 5
  • 4
11 Comments
 
LVL 5

Expert Comment

by:DanJourno
ID: 20392352
Hi,

It depends what you want to accomplish.

If you want the website from sub.domain2.com to display when you visit sub.domain1.com 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 sub.domain1.com as a CNAME and set it to poin to sub.domain2.com.

What type of server or hosting are you using?
Dan

0
 

Author Comment

by:marglar
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!
0
 
LVL 5

Expert Comment

by:DanJourno
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 sub.YOURDOMAIN.com.

eg.
If "sub.YOURDOMAIN.com" points to 123.123.123.123
you should tell them to point their subdomain to 123.123.123.123.

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 sub.YOURDOMAIN.com would automatically copy over to sub.OTHERCOMPANY.com

"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."

http://www.zytrax.com/books/dns/ch8/cname.html

Dan
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

Author Comment

by:marglar
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.

Thoughts?
0
 
LVL 5

Expert Comment

by:DanJourno
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

Dan
0
 

Author Comment

by:marglar
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...


0
 
LVL 5

Expert Comment

by:DanJourno
ID: 20392465
Is your application a web application?

i.e. a website?
0
 

Author Comment

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

Accepted Solution

by:
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 sub.YOURDOMAIN.com. You will need to add sub.OTHERCOMPANY.com 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:-
http://httpd.apache.org/docs/2.2/vhosts/

0

Featured Post

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

This article explains how a domain name may be inadvertently appended to all DNS queries. This exhibits as described below. (CODE)And / Or: (CODE) Cause This issue can occur in either of these two scenarios. EITHER 1. A Primary DNS S…
I will assume you are running a non-server version of some sort of Windows throughout this article. There are many flavors of Windows since Windows Server 2000 - 2008, XP Home & Pro, Vista Home & Pro, and Windows 7 Starter, Home, Pro, Ultimate, etc.…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

707 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