# Third-level domain

**URL:** <https://www.ruby-forum.com/t/third-level-domain/151700>\
**Category:** Rails\
**Created:** [October 24, 2008, 4:41pm UTC](https://www.ruby-forum.com/t/third-level-domain/151700 "2008-10-24T16:41:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![golf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/90db22/32.png) [@golf](https://www.ruby-forum.com/u/golf)\
**Post date:** [October 24, 2008, 4:41pm UTC](https://www.ruby-forum.com/t/third-level-domain/151700/1 "2008-10-24T16:41:00Z")

</div>

Hi,

I am wondering if there is chance to automatically create third-level  
domain. For example: new user registration, with rockguru nickname, and  
I would like to create a third-level domain for this user:  
[rockguru.mydomain.com](http://rockguru.mydomain.com).

Anyone knows how to do it? Is it possible?  
Thanks in advance.

Petr

---

<div class="post-metadata">

**Author:** ![golf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/90db22/32.png) [@golf](https://www.ruby-forum.com/u/golf)\
**Post date:** [October 24, 2008, 4:59pm UTC](https://www.ruby-forum.com/t/third-level-domain/151700/2 "2008-10-24T16:59:45Z")

</div>

On 24 Oct 2008, at 15:41, Petr B. wrote:

> Hi,
> 
> I am wondering if there is chance to automatically create third-level  
> domain. For example: new user registration, with rockguru nickname,  
> and  
> I would like to create a third-level domain for this user:  
> [rockguru.mydomain.com](http://rockguru.mydomain.com).

This is more a question for your network/sysadminy person, but you can  
create dns wildcars, ie \*.mydomain.com all pointing at your production  
server.

Fred

---

<div class="post-metadata">

**Author:** ![golf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/90db22/32.png) [@golf](https://www.ruby-forum.com/u/golf)\
**Post date:** [October 24, 2008, 5:40pm UTC](https://www.ruby-forum.com/t/third-level-domain/151700/3 "2008-10-24T17:40:29Z")

</div>

Frederick C. wrote:

> On 24 Oct 2008, at 15:41, Petr B. wrote:
> 
> This is more a question for your network/sysadminy person, but you can  
> create dns wildcars, ie \*.mydomain.com all pointing at your production  
> server.
> 
> Fred

Thank you, for your replay. So, it means that, there is no way how to do  
it using RoR?

---

<div class="post-metadata">

**Author:** ![golf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/90db22/32.png) [@golf](https://www.ruby-forum.com/u/golf)\
**Post date:** [October 24, 2008, 6:17pm UTC](https://www.ruby-forum.com/t/third-level-domain/151700/4 "2008-10-24T18:17:55Z")

</div>

On Oct 24, 4:40 pm, Petr B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Frederick C. wrote:
> 
> > On 24 Oct 2008, at 15:41, Petr B. wrote:
> 
> > This is more a question for your network/sysadminy person, but you can  
> > create dns wildcars, ie \*.mydomain.com all pointing at your production  
> > that should of course say wildcards  
> > server.
> 
> > Fred
> 
> Thank you, for your replay. So, it means that, there is no way how to do  
> it using RoR?

That is by far and above the easiest way in my opinion. I’m sure you  
could write code to fiddle with dns entries (assuming you control the  
nameserver) but it really wouldn’t be worth the hassle (and everytime  
you added new domains you’d have to wait for them to propagate).

Fred

---

<div class="post-metadata">

**Author:** ![golf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/90db22/32.png) [@golf](https://www.ruby-forum.com/u/golf)\
**Post date:** [October 24, 2008, 6:42pm UTC](https://www.ruby-forum.com/t/third-level-domain/151700/5 "2008-10-24T18:42:14Z")

</div>

Frederick C. wrote:

> > 
> 
> This is more a question for your network/sysadminy person, but you can  
> create dns wildcars, ie \*.mydomain.com all pointing at your production  
> server.

There is a railscast episode showing how this can be done with  
subdomain\_fu.

> **[\#123 Subdomains - RailsCasts](http://railscasts.com/episodes/123-subdomains)**
>
> Short Ruby on Rails screencasts containing tips, tricks and tutorials. Great for both novice and experienced web developers.

HTH

Matt
