Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am a programmer at heart but trying to get into learning some server stuff.

I am setting up a VPS with some simple things. Right now I want to get one of my domain names operating on it. I think I have apache setup with everything it needs, but I'm not sure what to do about my domain name. I've always put something like "ns1.whatever.com" into the DNS field on my registrar. I'm assuming that this will no longer work, so how do I set that up for myself? Do I host my own DNS..stuff?

Go easy on me.

EDIT: Thanks fellas, I appreciate the responses. Your posts helped me figure out what to do, and how it all works. :)

share|improve this question

3 Answers 3

up vote 2 down vote accepted

You need to create dns records at your registrar, these records are saved
in ns1.whatever.com and will point to your server when lookedup.

For example:

A RECORD
An a record will point to an IP-adress. i.e:

google.com. 111 IN A 74.125.45.100

CNAME
A CNAME will point to another "dns-address". i.e
www.google.se. 16559 IN CNAME www.google.com.

Going to www.google.se will point to www.google.com


MX record
A MX record is for mailservers. It points to an dns-name where
you have configured a mailserver for the domain. i.e
google.com. 490 IN MX 10 google.com.s9a1.psmtp.com.

share|improve this answer
    
Bad choice of examples since it is unlikely that the OP registered google.com... –  bortzmeyer Oct 2 '09 at 9:30
    
I think its an excellent choice as it shows real dns records as examples to the explanations –  artifex Oct 2 '09 at 13:40
    
Too real: for instance, the TTL field is likely to confuse people since you do not enter them in most Web forms for DNS management... –  bortzmeyer Oct 2 '09 at 15:23

There are plenty of registrars that will host your DNS records. You might want to shop around if your's doesn't provide this service. But if your question is simply about playing around with a virtual host, and not exposing it to public, then you can just add a record to /etc/hosts files on all machines or run a local dns server.

share|improve this answer
    
Ok, so if I use my registrar, then what? How do I tell it to point to my server? –  Allyn Oct 2 '09 at 5:40
1  
If, as monomyth indicates, your registrar is also hosting your domain then you just need to create a host (A) record for your VPS. Give the record a name like www and the IP address of your VPS. Then you'll have a URL of www.mydomain.com. –  squillman Oct 2 '09 at 5:55

[This is mostly a rehashing of squillman's comment.]

  1. Register your domain name (let's call it example.org).
  2. Most companies that register domain names (for .ORG, it is called a registrar) also host the DNS servers. Unless you want to put an authoritative name server on your VPS (something that would require some education first), we'll use this service.
  3. Create address records (A for the old IPv4 and AAAA for IPv6) going to the IP address of your VPS. If you give the record a name like www, and if the HTTP server (Apache) is set up properly, then you'll have a URL of http://www.example.org/. The exact way to create these records depend on your provider but it is typically done through a Web form.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.