CNAMES, A Records, etc

I’m building a dropship platform for a client at the moment, where subscribers pay a fee and are able to open up stores to feature dropship items on. My client would like store owners to have the option to use their own domain names for their stores.

I’ve seen this done several times in the past at places like Shopify and [URL=“http://www.tumblr.com/”]Tumblr, where they ask for your desired domain name, and ask you to point the DNS records for the domain to a CNAME or A Record.

How do I go about building this functionality into my platform?

FYI, I’m hosted with MT, and developing with PHP. Also, the system needs to be automatic…so it’s not an option for support staff to add domains as secondary domains and such…

Thanks in advance! :slight_smile:

No, that’s great. Just the kind of thing I’m looking for. However, you’re right, that would be pretty messy. Also, I’m on MT, and not sure whether this will be hosted on a Dedicated server, or a GridServer. So, I’m not sure if I’ll have access to affect apache’s files. That would be a good way to do it though…

I would set up a dynamic virtual host to handle all of the unhosted domains. From their I’d have it route it to it’s document root, and i’d use the $_SERVER[‘HTTP_HOST’] or $_SERVER[‘SERVER_NAME’] to handle it on the PHP side.

@ hl: Good deal. Seems like it’ll be the way to do it.

@ ahmednuaman: Nice website! :slight_smile: