# Data from my db to be my subdomain names?

**URL:** <https://www.ruby-forum.com/t/data-from-my-db-to-be-my-subdomain-names/70595>\
**Category:** Rails\
**Created:** [September 30, 2006, 8:08pm UTC](https://www.ruby-forum.com/t/data-from-my-db-to-be-my-subdomain-names/70595 "2006-09-30T20:08:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![3nd3r](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/3/c4cdca/32.png) [@3nd3r](https://www.ruby-forum.com/u/3nd3r)\
**Post date:** [September 30, 2006, 8:08pm UTC](https://www.ruby-forum.com/t/data-from-my-db-to-be-my-subdomain-names/70595/1 "2006-09-30T20:08:16Z")

</div>

i know DHH said this was a bad idea because if you were to ever update  
that object in your db, that your link wouldn’t work. But does anyone  
know how I would go about making that data from my db be accessible as  
subdomains?

---

<div class="post-metadata">

**Author:** ![3nd3r](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/3/c4cdca/32.png) [@3nd3r](https://www.ruby-forum.com/u/3nd3r)\
**Post date:** [September 30, 2006, 9:11pm UTC](https://www.ruby-forum.com/t/data-from-my-db-to-be-my-subdomain-names/70595/2 "2006-09-30T21:11:00Z")

</div>

One way would be not to update your “subdomain data” on model update.  
Have a  
separate field which stores that data only on create. You work around  
the  
problem. Wordpress (by default) takes a similar approach on blog posts  
resaved with a different title.

Vish

---

<div class="post-metadata">

**Author:** ![3nd3r](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/3/c4cdca/32.png) [@3nd3r](https://www.ruby-forum.com/u/3nd3r)\
**Post date:** [October 3, 2006, 12:30am UTC](https://www.ruby-forum.com/t/data-from-my-db-to-be-my-subdomain-names/70595/3 "2006-10-03T00:30:17Z")

</div>

hi

i have seen it (but not entirely yet) on the sd.rb pocast, they talk  
about  
this website [http://out.landi.sh](http://out.landi.sh) which handles dynamic subdomains

it is in the episode 06.

–  
Heri R.  
[http://sprinj.com](http://sprinj.com)

---

<div class="post-metadata">

**Author:** ![3nd3r](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/3/c4cdca/32.png) [@3nd3r](https://www.ruby-forum.com/u/3nd3r)\
**Post date:** [October 3, 2006, 3:53am UTC](https://www.ruby-forum.com/t/data-from-my-db-to-be-my-subdomain-names/70595/4 "2006-10-03T03:53:11Z")

</div>

Nahice…thanks guys…

Heri R\> wrote:

> hi
> 
> i have seen it (but not entirely yet) on the sd.rb pocast, they talk  
> about  
> this website [http://out.landi.sh](http://out.landi.sh) which handles dynamic subdomains
> 
> it is in the episode 06.
> 
> –  
> Heri R.  
> [http://sprinj.com](http://sprinj.com)
