| Author |
Message |
seanhess
Joined: 06 Aug 2008
Posts: 10
|
| Posted: Thu Aug 07, 2008 6:04 pm Post subject: Subdomains and DNS |
|
|
I know how to set up virtual hosts, but that doesn't have anything to do with subdomains connecting to apache at all, does it?
I have mydomain.com, and test.mydomain.com can't find a server, while mydomain.com does. I looked in the DNS manager, and it doesn't seem to have any kind of wildcard entry. How do I set this up?
Thanks
~sean |
|
| Back to top |
|
hippo
Joined: 21 Jun 2008
Posts: 4
|
| Posted: Thu Aug 07, 2008 6:20 pm Post subject: |
|
|
| Setup a CNAME record '*' that aliases to your hostname. |
|
| Back to top |
|
MrRx7
Joined: 21 May 2008
Posts: 31
Location: Austin, Tx
|
| Posted: Fri Aug 08, 2008 4:05 am Post subject: |
|
|
you can also do a "A" record
test A 600 mydomain.com
record
it will do the same as a cname |
|
| Back to top |
|
seanhess
Joined: 06 Aug 2008
Posts: 10
|
| Posted: Fri Aug 08, 2008 7:53 am Post subject: |
|
|
| Thanks guys... that was easy |
|
| Back to top |
|
AverageGuy
Joined: 03 Aug 2008
Posts: 14
Location: Georgia, USA
|
| Posted: Fri Aug 08, 2008 10:08 am Post subject: |
|
|
MrRx7 wrote: you can also do a "A" record
test A 600 mydomain.com
record
it will do the same as a cname
OK, which of the two methods is preferred? Is there a reason to use one over the other?
I'm still trying to get my hands around DNS.
Thanks,
Jim. |
|
| Back to top |
|
ashevin
Joined: 30 Jul 2008
Posts: 1
|
| Posted: Fri Aug 08, 2008 11:13 am Post subject: |
|
|
First, what is being defined here is not a sub-domain at all. In the case of the A record, it is a single host that is in the domain 'mydomain.com'. In the case of the wildcard CNAME, it is a record that resolves any name to the A name referred to in the CNAME record.
Ideally, a wildcard CNAME entry should never be used. I don't believe that it is standard, and I know from personal experience that it will not always work as expected or desired, especially with software that does extensive DNS queries, such as an MTA or webserver.
If you want a host to be referred to by many names, you can either use multiple A records or a single A record and multiple CNAME records.
Feel free to use nslookup or dig to check ashevin.com to see how I manage my own domain. |
|
| Back to top |
|
seanhess
Joined: 06 Aug 2008
Posts: 10
|
| Posted: Fri Aug 08, 2008 11:21 am Post subject: |
|
|
Quote: If you want a host to be referred to by many names, you can either use multiple A records or a single A record and multiple CNAME records.
But is there a "standard" way to point all subdomains to the same place? |
|
| Back to top |
|
MrRx7
Joined: 21 May 2008
Posts: 31
Location: Austin, Tx
|
| Posted: Sat Aug 09, 2008 2:45 am Post subject: |
|
|
seanhess wrote: Quote: If you want a host to be referred to by many names, you can either use multiple A records or a single A record and multiple CNAME records.
But is there a "standard" way to point all subdomains to the same place?
I have used both and either will work fine, I have not noticed any differences between either method. I personally use "A" records for my subdomains |
|
| Back to top |
|
AverageGuy
Joined: 03 Aug 2008
Posts: 14
Location: Georgia, USA
|
| Posted: Sat Aug 09, 2008 10:22 am Post subject: |
|
|
AverageGuy wrote:
OK, which of the two methods is preferred? Is there a reason to use one over the other?
So I guess the answer in the simple case is no.
Thanks,
Jim. |
|
| Back to top |
|
| |