How to create a SubDomain

  • Thread starter Thread starter Tina
  • Start date Start date
T

Tina

Our company domain, say, wombat.com needs to create several subdomains:
support, training, and purchase are three of the subdomains needed. So when
someone browses to //training.wombat.com they will be directed to the IP we
have assigned. I have two questions:

1. how can I do this at design time?

2. how can I do this at run time from my asp.net code?

Thanks,
T
 
Our company domain, say, wombat.com needs to create several subdomains:
support, training, and purchase are three of the subdomains needed. So
when someone browses to //training.wombat.com they will be directed to the
IP we have assigned.

All they do is purchase wombat. traning.wombat is something they set up
themselves on their DNS server.
1. how can I do this at design time?
2. how can I do this at run time from my asp.net code?

It's a network/DNS/IIS setting...not an application setting.

-Darrel
 
bruce,
Yes I know they are dns entries. Now, can you answer the two questions?
Thanks so much,
T
"bruce barker (sqlwork.com)"
 
re:
!> Yes I know they are dns entries. Now, can you answer the two questions?
!> 1. how can I do this at design time?
!> 2. how can I do this at run time from my asp.net code?

You can't do it at design time and you can't do it from code.

I suggest you read up on what dns servers actually do.

http://en.wikipedia.org/wiki/Domain_name_system



Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
 
Juan,
I just got done reading the entire help file for the DNS server product. It
was nearly a complete education and I now understand levels of domain mames,
subdomains, zones, reverse lookups, etc. It told me nearly everything....

...except how to create a subdomain

I then spent time googling every word combination I could think of such as
"create a subdomain." to no avail. I found a lot of other people asking but
no answers.

It looks like no one else knows either judging by the quality of answers
I've received thus far on this thread.
T
 
at design or runtime its the same, you give the dns server the ipaddress and
domain name. it must a trusted dns server to update the internet. generally
you need to be admin on the dns server to update it.

how will depend on which dns server you are using as the trusted one (by
the internet). if its a windows box, use dns manager. if you are using a
unix based dns server, then you want to use bind.

if you servers have ldap support you can use a ldap library to talk to the
dns server.

-- bruce (sqlwork.com)
 
(Assuming this isn't a troll question....)

Simply give each DNS record an A record. Alternatively, CNAMES could
point to aliases of already configured subdomains. You realize in
www.whatever.com., www is a subdomain, right?

Controlling DNS records from the application level would be quite
difficult, and I don't see the benefit.

Here's a solution that might work (I don't know how to do it off the top
of my head with IIS, but it can't be difficult): use name-based virtual
hosts. Use a wildcard to resolve all subdomains to a certain host
(GoDaddy supports this feature), then the application could maybe be
programmed to respond differently depending on which subdomain a user's
browser sends in the headers; the browser should pass the subdomain it's
seeking as an environmental variable, and your application can respond
accordingly. When the application checks the environmental variable, it
can deliver a different page based on what host header is supplied by
the browser.

The disadvantage is you couldn't use SSL with name-based vhosts; you
also won't be able to server HTTP 1.0 clients very well (but then,
almost nobody is limited to HTTP 1.0 anymore; most browsers support 1.1,
and many hosting companies use name-based vhosts).

But the advantage is you save IPs and have more flexibility in what
sites to host.

http://httpd.apache.org/docs/2.2/vhosts/ - that's Apache's vhost
configuration info. It won't help with IIS, but it goes into a bit more
detail weighing the advantages and disadvantages than I just did. I
know IIS supports name-based vhosts too. I just don't remember how to do it.
 
thanks, uh, what's a troll question?
T

Bolwerk said:
(Assuming this isn't a troll question....)

Simply give each DNS record an A record. Alternatively, CNAMES could
point to aliases of already configured subdomains. You realize in
www.whatever.com., www is a subdomain, right?

Controlling DNS records from the application level would be quite
difficult, and I don't see the benefit.

Here's a solution that might work (I don't know how to do it off the top
of my head with IIS, but it can't be difficult): use name-based virtual
hosts. Use a wildcard to resolve all subdomains to a certain host
(GoDaddy supports this feature), then the application could maybe be
programmed to respond differently depending on which subdomain a user's
browser sends in the headers; the browser should pass the subdomain it's
seeking as an environmental variable, and your application can respond
accordingly. When the application checks the environmental variable, it
can deliver a different page based on what host header is supplied by the
browser.

The disadvantage is you couldn't use SSL with name-based vhosts; you also
won't be able to server HTTP 1.0 clients very well (but then, almost
nobody is limited to HTTP 1.0 anymore; most browsers support 1.1, and many
hosting companies use name-based vhosts).

But the advantage is you save IPs and have more flexibility in what sites
to host.

http://httpd.apache.org/docs/2.2/vhosts/ - that's Apache's vhost
configuration info. It won't help with IIS, but it goes into a bit more
detail weighing the advantages and disadvantages than I just did. I know
IIS supports name-based vhosts too. I just don't remember how to do it.
 
Tina said:
thanks, uh, what's a troll question?
T

Sorry, I found it odd that you said you knew all about DNS, but didn't
know how to make a subdomain. :-p

I have to warn you, the solution I suggested is pretty inflexible, but I
guess works. I think you'd be better off just using subdirectories.

Good luck
 
Yes. I know. Now can you answer the two questions?

You'd think that someone that 'knows' that would ask this question in a DNS
forum rather than an ASP.net one.

-Darrel
 
Back
Top