| Linode Forum https://forum.linode.com/ |
|
| Have members use custom domain name https://forum.linode.com/viewtopic.php?f=19&t=8463 |
Page 1 of 1 |
| Author: | nthvision [ Mon Feb 20, 2012 9:53 pm ] |
| Post subject: | 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 |
|
| Author: | hybinet [ Mon Feb 20, 2012 10:27 pm ] |
| Post subject: | |
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. |
|
| Author: | nthvision [ Mon Feb 20, 2012 10:48 pm ] |
| Post subject: | |
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? |
|
| Author: | hybinet [ Tue Feb 21, 2012 12:49 am ] |
| Post subject: | |
nthvision wrote: 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) |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|