Have members use custom domain name

Hey guys I was wondering if anyone has any knowledge on how to have members use their domain name to point to their profile. For example tumblr uses this feature (big cartel does too), all the member has to do is point their A record to 66.6.44.4 or if they have a subdomain that has three or more levels, like www.mywebsite.com or blog.mywebsite.com point the CNAME record for the subdomain to domains.tumblr.com. ( Source:http://www.tumblr.com/docs/en/custom_domains )

I really want to implement a feature like this on an idea im working on and I know since I have a Linode, anything is pretty much possible.

basically:

mrfoobardomain.com –-> mylinodesite.com/member/mrfoobar

but of course, in the address bar it always stays as mrfoobardomain.com except the application is driven by mylinodesite.com

3 Replies

You'd need to write an application that runs on mylinodesite.com. The app will detect when Host: request header is different from mylinodesite.com, look it up in your member database, and take appropriate action such as displaying the member's profile page (or hooking into another app that displays the profile page). This app can be written in any language or framework: PHP, Python/Django, Ruby/Rails, whatever.

if All I need to do is write the app , then why does tumblr for example have the user change the A record in their DNS , what purpose does this serve?

@nthvision:

if All I need to do is write the app
I never said it's all you need to do.

The world wide web works roughly like this:

1) A person types an address into their browser, or they click on a link.

2) The browser figures out which server is responsible for handling the domain. This is what the A record does: it's like a phonebook for the internet.

3) The browser connects to the server, tells the server which domain it wants, along with a bunch of other information.

4) The server listens to the browser and decides what content to send, based on the information provided by the browser.

5) The server sends the content to the browser.

6) The browser shows the content to the person.

If the website is on your own domain, you control everything from step 2 to 5. But your case requires at least two parties to cooperate. After all, you can't control A records on other people's domains, and other people can't control the behavior of your server.

The A record must be changed on the domain owner's side so that other people who type their domain will be directed to your server. (Step 2)

The app must be set up on your side so that your server knows whose profile to display once other people are connected to it. (Step 4)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct