DNS Help!

Discussion in 'Web Design and Development' started by jona980, Jan 29, 2009.

  1. jona980 macrumors newbie

    Jan 29, 2009

    Sorry for the lame question - I'm trying to launch a new website, but I'm not really sure on how to do it.

    I have an IP address for the host server. Is it that all I need do is update the A Record within the domain registrar to point there?

    If that's the case, what is a Name Server Record then? Would I also need to update that?

    Last question. Is the MX record going to be the same IP address if the emails are being hosted on the same server?

    Any help would be very much appreciated!

  2. MacSociology macrumors regular

    Aug 13, 2006
    Battleground Europe?!
    Well, there are no lame questions. There's only lame questions. :)

    1. Yes. The A Record should point to the IP-address of your server.

    2. If you want to use your hosts nameserver, put in the address for their nameservers. (Usually ns1.hostname.com and ns2.hostname.com). But if you have registered your domain with a registrar like GoDaddy.com or Namecheap.com, you don't have to use your hosts nameserver. Look at answer 1. This will be enough.

    3. Yes. The MX record should be the IP-address. As long as that's the only thing they're asking for in this matter. This depends on which Registrar you're using.
  3. ChicoWeb macrumors 65816


    Aug 16, 2004
    Actually, most MX records aren't IP's. Typically they are something like, ASPMX.GOOGLE.COM. Using an IP address for a MX record can cause problems.
  4. jona980 thread starter macrumors newbie

    Jan 29, 2009
    Thanks for your response! And that's what I'm unsure of. How do I know when or when not to use a nameserver as opposed to updating an IP address for the A Record? Does a nameserver update the MX Record too?
  5. SrWebDeveloper macrumors 68000


    Dec 7, 2007
    Alexandria, VA, USA
    I'm gonna cover most situations here, print this out, best advice.

    The registrar will usually have a web based GUI so you can setup your own DNS (zone file) which contains any of the following:

    A records are associated with actual IPs in your subnet and CNAME records are optional aliases for your A record intended for adding hostnames of our choosing which define each "xxx" in xxx.yourdomain.com (i.e. www, ftp, smtp, etc.). Most people define www at least, I used ftp in my example below as well. If you have one IP for everthing, use it for your A record and CNAME all other hostnames. MX records are only for mail exchange, special records that tell the world your server also processes E-Mail.

    Below is a typical example setup that creates an A record for yourdomain.com, a sensible CNAME so users can find your website with www.yourdomain.com, a mail.yourdomain.com alias, an MX record set with metric 0 (if you had a backup mail server, you'd define that also and use the metric to determine which one is accessed first, i.e 0 for the first and 1 for the second), and ftp.yourdomain.com which like any CNAME is optional and added for convenience. In truth the first 4 below are considered the most minimum and most sensible zone file records:

    yourdomain.com IN A x.x.x.x (IP address)
    www.yourdomain.com IN CNAME yourdomain.com
    mail.yourdomain.com IN CNAME yourdomain.com
    yourdomain.com IN MX 0 mail.yourdomain.com
    ftp.yourdomain.com IN CNAME yourdomain.com

    Note: All you need to remember is if a zone file is setup for you, check it out for accuracy, otherwise create it based on the typical example above. It's usually an online form with options and text fields. You might see SOA and NS records too - don't change those unless you know what you're doing, they're key records usually set by the registrar when the domain is registered or transferred to them. If you see an option for each record to set a TTL, and there are default values already set, leave them. TTL means "time to live", how long it takes in minutes (usually) for the nameserver to pickup any changes in any records. Set to a low value like 15 if you're in a rush, but after the web site can be accessed via yourdomain.com in the browser, change the TTL settings back to their original values, usually 14400. Adjust TTL is usually only adjusted temporarily for domain transfers or server migrations.

    Most people do not host their own nameserver and I did not provide help for that as that's a completely different setup. All you're doing in the instructions above is setting up the basic zone file on their web site. That in turn updates the Internet's DNS system so the world can find your web site, email is processed properly, plus any optional hostnames (i.e. ftp.yourdomain.com) are setup as you wish beyond just using yourdomain.com for everthing. It's not too hard once you know how it works under the hood. Hope this helps you!


    ps: Note to jona980 -- an MX record can be either an IP -or- a previously defined CNAME so long as its hostname has an A record.
  6. ChicoWeb macrumors 65816


    Aug 16, 2004
    Great info. Except I still wouldn't use an IP for an MX record. It will work, but I've seen it cause issues in the past. The RFC recommends it not be an IP address as well.

Share This Page