Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

unique asp.net url for each customer

we are developing an asp.net app and we want each customer to have a unique url. what is the best way to accomplish this? http://customer1.coolwebapp.com or http://www.coolwebapp.com?cust=customer1. we would like to automate the entire purchase process. what are the pros and cons of each url?

thanks.

mark
Wednesday, March 16, 2005

using a sub domain is neat and the client might like it - but to you want to automate creating DNS entries?

the second option will work - and is super simple but its not memerable by the customer.  And I'd probably obfuscate the "cust="

there is another option

how about

http://www.coolwebapp.com/username

- easy to remember - and as long as you ensure that usernames (or whatever) are unique, pretty simple to implement - you just build a handler (http 404 for eg) would intercept the request (as there is no dir or page in existance) and then search your db for username to find their ID and finally to redirect them to your query string.....

pete
Wednesday, March 16, 2005

This is something I have been wondering also.

I would like to implement the first option of using subdomains. (http://username.mydomain.com)

I have spent a bit of time googling with no luck and have no idea how to go about doing this.  Anyone have any good articles or tutorials handy?

Matt
Thursday, March 17, 2005

==> Anyone have any good articles or tutorials handy?

Before answering that, we've got to know who (or better what) handles your DNS database. Wouldn't do me any good to point you to some VBScript to update a Windows DNS box if you're using, say, bind on a linux box for DNS services.

Sgt.Sausage
Thursday, March 17, 2005

Following up to Matt's question about http://username.mydomain.com he would be using  Windows 2003 Enterprise Edition to control his DNS entries.  So if you have any good articles for us to review that would be great.

cw
Friday, March 18, 2005

You can use a DNS wildcard so that *.mydomain.com resolves to some IP address.  Then when your app receives a request you can fish the actual domain out of the URL.  You can't use host headers with this technique though.

JamesM
Saturday, March 19, 2005

*  Recent Topics

*  Fog Creek Home