Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Adding a subdomain ONLY
PostPosted: Tue Jul 05, 2011 2:13 am 
Offline
Senior Newbie

Joined: Wed Feb 09, 2011 2:47 am
Posts: 11
Hi,

I have been successfully adding many domains to my Linode (Ubuntu 10.04) server, and can handle subdomains easy enough with my configuration.

I currently need to add a single subdomain for a domain that the full site is hosted elsewhere. The DNS has been configured so the subdomain (only) directs to Linode, while the rest of the site is maintained on another server.

How should I set this up on my server? I have added the domain (including the subdomain) to the dashboard, eg. subdomain.website.com, should I have done this, or adding the subdomain within a record that covers the entire domain?

Also, with the DNS configuration, should I have given the Linode nameserver IP addresses, or my personal IP address for my own Linode server?

Any help is much appreciated,
Rhys


Top
   
 Post subject:
PostPosted: Tue Jul 05, 2011 9:57 am 
Offline
Senior Member

Joined: Thu May 21, 2009 3:19 am
Posts: 336
If the DNS for that domain already has a record for the sub-domain pointing to your Linode's IP address, that's all that's needed. You don't need to make any changes to DNS at Linode. Just make a vhost entry in Apache or what ever web server you're using, reload the web server and you're done.


Top
   
 Post subject:
PostPosted: Tue Jul 05, 2011 6:09 pm 
Offline
Senior Newbie

Joined: Wed Feb 09, 2011 2:47 am
Posts: 11
Thank you waldo, I will try that now.
So I do not have to add any entry to my DNS Manager? Can I ask why that is, technically? I assumed any domain/subdomain pointed to my server would require this...

And the IP address should be my Linode IP, not the Linode's NS1/NS2 nameserver IP addresses, correct? Currently it is set to the NS1 IP and not working.


Top
   
 Post subject:
PostPosted: Wed Jul 06, 2011 12:29 am 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
RhysPatterson wrote:
… So I do not have to add any entry to my DNS Manager? Can I ask why that is, technically? I assumed any domain/subdomain pointed to my server would require this...

The DNS lookup is done at the 'other' DNS server where you have all the entries for your domain. Linode's DNS is nothing to do with this process.

RhysPatterson wrote:
And the IP address should be my Linode IP, not the Linode's NS1/NS2 nameserver IP addresses, correct? Currently it is set to the NS1 IP and not working.

Yes, the DNS entry on the 'other' DNS server should point to your Linode IP.

_________________
/ Peter


Top
   
 Post subject:
PostPosted: Wed Jul 06, 2011 12:31 am 
Offline
Senior Newbie

Joined: Thu Jun 24, 2010 10:07 am
Posts: 18
RhysPatterson wrote:
Thank you waldo, I will try that now.
So I do not have to add any entry to my DNS Manager? Can I ask why that is, technically? I assumed any domain/subdomain pointed to my server would require this...

Hi Rhys, you do not need to add any entry to the DNS manager. I will explain why:
Basically, each domain has some settings that say which Name Servers (NS) control it. When other Name Servers or People try to look up the address of the server (i.e., domain.com), then query the nameservers for domain.com, and they will respond with an IP address. If you have a subdomain, because this is still part of domain.com, all information about domain.com will reside in the specific nameservers for it. I.e., subdomain.domain.com, reallybigcarrots.domain.com, and domain.com will all have their settings on the same nameservers (i.e., NS1.DNSHOST.com, NS2.DNSHOST.com, etc). These settings can point to any IP address you like, however, you cannot have a subdomain controlled by a different nameserver (and there's no point to it). This is why you do not have to add it to Linode's DNS manager - this is only for domains that are controlled by Linode's Name Servers. As this is a subdomain, adding it in Linode's DNS manager will be pointless, because no one will look there for the information.

This is also not needed, because your web server will respond either based on people requesting the IP address (a dedicated host/website), or, based on the domain/subdomain being requested (for shared/VHOST'd sites). I.e., if I pointed a subdomain of my site (for example, rhys.greyhat-security.com) to your Linode's IP, I'd either get
a) Your website displaying (in the case of 1 dedicated website for that IP address)
or
b) A blank/default page, until you tell your web server that rhys.greyhat-security.com points to such-and-such a sub-folder

RhysPatterson wrote:
And the IP address should be my Linode IP, not the Linode's NS1/NS2 nameserver IP addresses, correct? Currently it is set to the NS1 IP and not working.

It should be the Linode's IP, because when someone types "subdomain.cows.com" into their browser, their browser queries the nameserver for the IP (lets say 65.65.65.65), and tries to access the web page on this IP address. If you've set subdomain.cows.com to point to Linode's Name Servers, you browser will simply try and pull a page off the Name Servers, which doesn't exist. Set this to be your Linode's IP, and it will all be fine and dandy :) Let me know if you've still got questions ;)

EDIT: Replied at the same time as poster above ^ Didn't mean to steal your steam, but I just took longer to reply :P Oh well, two's better than 1 ;)


Top
   
 Post subject:
PostPosted: Wed Jul 06, 2011 12:42 am 
Offline
Senior Newbie

Joined: Wed Feb 09, 2011 2:47 am
Posts: 11
Thank you to everybody who responded. I have successfully directed the subdomain to my server and now know more details about how DNS works!

Thanks again


Top
   
 Post subject:
PostPosted: Wed Jul 06, 2011 12:46 am 
Offline
Senior Newbie

Joined: Thu Jun 24, 2010 10:07 am
Posts: 18
RhysPatterson wrote:
Thank you to everybody who responded. I have successfully directed the subdomain to my server and now know more details about how DNS works!

Thanks again

Glad to help, for my part in it :)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group