Linode Forum Index Linode Forum
Linode Community Forums
 


A very easy question (I hope)

Click here to go to the original topic

 
       Linode Forum Index -> Linux Networking
Author Message
mactac



Joined: 09 Jul 2010
Posts: 20

Posted: Mon Sep 06, 2010 2:03 pm    Post subject: A very easy question (I hope)  

I have a whole ton of domains that I'd like to point at a website.

for example, domain xyz.com should end up bringing up website abc.com (with abc.com in the bowser address bar).

I'm using debian/apache2

Now, I could go & make a ton of websites with a redirect on them, but then I'd have to add a ton of sites into sites_available virtual host entries, plus make a bunch of redirects.

Is there an easier way, perhaps with dns?

I'm a bit of a noob here, so syntax would be most helpful.

thanks!
Back to top  
pclissold



Joined: 24 Oct 2003
Posts: 877
Location: Netherlands

Posted: Mon Sep 06, 2010 2:25 pm    Post subject:  

Use DNS:
Code: abc.com.   A       12.34.56.78
uvw.com.   CNAME   abc.com.
xyz.com.   CNAME   abc.com.
Back to top  
mactac



Joined: 09 Jul 2010
Posts: 20

Posted: Mon Sep 06, 2010 2:37 pm    Post subject:  

pclissold wrote: Use DNS:
Code: abc.com.   A       12.34.56.78
uvw.com.   CNAME   abc.com.
xyz.com.   CNAME   abc.com.

perfect. thanks !
Back to top  
mactac



Joined: 09 Jul 2010
Posts: 20

Posted: Mon Sep 06, 2010 2:38 pm    Post subject:  

wait - is this in the dns record for abc.com or xyz.com?
Back to top  
hoopycat



Joined: 30 Aug 2008
Posts: 1294
Location: Rochester, New York

Posted: Mon Sep 06, 2010 3:07 pm    Post subject:  

pclissold wrote: Use DNS:
Code: abc.com.   A       12.34.56.78
uvw.com.   CNAME   abc.com.
xyz.com.   CNAME   abc.com.

That would only work if placed in the .com zone, which is probably exceedingly unlikely. Also, it wouldn't solve the telling-Apache-about-it problem.

You're going to end up needing to create each domain individually in the DNS manager, but you can use ServerAlias in Apache to specify alternate names for a virtual host:

Code: ServerName example.com
ServerAlias www.example.com
ServerAlias example.org
ServerAlias www.example.org
...


I believe there's an option in Apache that'll have it redirect requests for ServerAliases to the ServerName, too, but it's been awhile and I can't recall what it is. (If not, mod_redirect would work too.)
Back to top  
GrunkaLunka



Joined: 21 Nov 2005
Posts: 46

Posted: Mon Sep 06, 2010 6:09 pm    Post subject: Re: A very easy question (I hope)  

mactac wrote: for example, domain xyz.com should end up bringing up website abc.com (with abc.com in the bowser address bar).

This part won't work with pure DNS, will it?. I think you're gonna have to do Apache redirects.
Back to top  
jed



Joined: 28 Mar 2009
Posts: 394
Location: New Jersey

Posted: Tue Sep 07, 2010 8:34 am    Post subject:  

pclissold wrote: Use DNS:
Code: uvw.com.   CNAME   abc.com.
xyz.com.   CNAME   abc.com.
The DNS Manager won't let you do specifically that, due to a strict reading of RFC 1912 section 2.4. If it were www.uvw.com, it would work.
Back to top  
pclissold



Joined: 24 Oct 2003
Posts: 877
Location: Netherlands

Posted: Tue Sep 07, 2010 9:05 am    Post subject:  

jed wrote: pclissold wrote: Use DNS:
Code: uvw.com.   CNAME   abc.com.
xyz.com.   CNAME   abc.com.
The DNS Manager won't let you do specifically that, due to a strict reading of RFC 1912 section 2.4. If it were www.uvw.com, it would work.
I took the examples from mactac's question -- I should have been more careful / specific.
Back to top  
 
       Linode Forum Index -> Linux Networking
Page 1 of 1