DNS, Tertiary SubDomain Tricks for Web 2.0 Apps

04 Sep 2008

Never really thought about this approach before, but if your DNS * record for your domain maps to your web server, you can use just a servlet filter or whatever other technology you want to use to capture custom tertiary level subdomains URLs and redirect to a user-specific page.

For example, if you want http://matthew.ambientideas.com to take your users to a user-profile page, there's no need to wire in your DNS to your software app, constantly updating it per user. You just capture the URL, parse out the tertiary domain part, and redirect, say, to http://ambientideas.com/users/?user=matthew. Easy, straightforward and cool. Kudos to Jordan for the first implementation for an upcoming app from Ambient Ideas.