Custom DNS

What DNS is

DNS (Domain Name System) is the system used on the internet to translate domain names (e. g. www.example.com, fastmail.fm, etc.) to actual machines to contact. The process of converting a domain name to a machine to contact is called a "lookup".

Each domain can have multiple different result types for a lookup, called "record types". The three most common record types are NS records, A records and MX records.

  • NS (name server) record lookups are used to work out what machine to contact for other record lookups. Generally when you register a domain, you need to specify the name servers to use for that domain, which are then used for all other record lookups.

  • A (address) record lookups are used when you want to visit a website for a given domain (e. g. http://www.example.com). Each A record lookup returns an IP address which identifies a specific machine on the internet to contact to get the webpage.

  • MX (mail exchanger) record lookups are used when you want to send email to a given domain (e. g. user@example.com). Each MX record lookup returns a list of mail exchanger machines to contact to deliver email for the domain to.

DNS also allows other record types such as SOA, TXT, PTR and SRV records used for various other less commonly used services.

Default DNS records

If you don't specify custom DNS settings for a domain, then our name servers will publish the following records for your domain:

     yourdomain.com Type=MX     TTL=3600 STANDARD_MX     (standard email - e. g. user@yourdomain.com)
   *.yourdomain.com Type=MX     TTL=3600 STANDARD_MX     (subdomain addressed email - e. g. user@mail.yourdomain.com)
     yourdomain.com Type=A      TTL=3600 STANDARD_WEB    (main website - http://yourdomain.com/)
   *.yourdomain.com Type=A      TTL=3600 STANDARD_WEB    (subdomain websites - including http://www.yourdomain.com/)
mail.yourdomain.com Type=A      TTL=3600 STANDARD_MAIL   (webmail login - http://mail.yourdomain.com/)
     yourdomain.com Type=CSV    TTL=3600 CSV_DENY_ALL    (no email sending machines identify as yourdomain.com)
     yourdomain.com Type=JABBER TTL=3600 STANDARD_JABBER (standard chat server - chat.messagingengine.com)
 wap.yourdomain.com Type=A      TTL=3600 STANDARD_WAP    (cellphone WAP service - http://wap.yourdomain.com/)
        

These records are suitable for most users.

  • All email for your domain (and subdomains) is directed to our servers.
  • Web access for your domain (and subdomains) can be pointed to files in your file storage area.
  • You can login to your webmail account at http://mail.yourdomain.com/
  • You can login to your account via WAP (cellphone) at http://wap.yourdomain.com
  • You can chat via XMPP/Jabber to people in your domain via our chat server

The meaning of STANDARD_MX, STANDARD_WEB, and STANDARD_MAIL are described below.

Custom DNS records

DNS can be a confusing and complicated system. If you get something wrong, you can bounce email for your domain, or cause your domains website to stop working, and it can take hours or days to fix. For that reason, unless you understand what you're doing, or have been instructed explicitly by someone who knows what they're doing, we recommend that you don't modify the DNS for your domain.

Having said that, if you know exactly what you want to do, then the Custom DNS screen will let you create arbitrary DNS A, MX, etc records for your domain or subdomains, allowing you to specify exactly what DNS records to publish for your domains you have setup at FastMail.FM.

This allows you to:

  • Have email for your domain delivered directly to our servers, but have your website hosted somewhere else;
  • Have email delivered to our servers, but setup a backup email server at another host;
  • Have the website www.yourdomain.com hosted in your file storage area, but have the website blog.yourdomain.com hosted on another server.

Setup

There are two things you need to do:

  • Point the name server (NS) records for your domain to our DNS servers. When you signup a domain with a domain registrar, you'll be ask to provide at least 2 name servers for that domain. The name servers to use are:

    • ns1.messagingengine.com
    • ns2.messagingengine.com
  • Add the domains as virtual domains to our system. You can do this on the Options screen and Virtual Domains screen.

Once these steps are done, we will publish default DNS records (see above) for your domain. You can then use the Custom DNS screen to change the DNS records for your domain to whatever you want. Currently we support creating A, MX, CSV, CNAME, SRV, TXT and SPF records. We may add more in the future.

Uses

Some of the things you can do with the custom DNS (and URL redirection) features:

  1. Use your file storage area to publish files as a website, either in your own domain if configured through the Options -> Virtual Domains screen, or to http://yourusername.fastmail.fm (see Files, Websites). Just log in to your account and go to the Options -> Websites/Redirects screen.

  2. Use your file storage area to publish a directory of photos as a photo gallery either in your own domain, or to http://yourusername.fastmail.fm (see Files, Photo Gallery).

  3. Change the DNS for your domain to point to other servers. For instance, make http://blog.yourdomain.com point directly to a blogging service, or http://wiki.yourdomain.com point to a wiki service, or http://mail.yourdomain.com point straight to the FastMail.FM login screen (actually this is already the default for all Virtual Domains who use the DNS at FastMail.FM). Just login to your account and go to the Options -> Custom DNS screen.

  4. Maybe the service you want doesn't support domain mappings, so just use a redirect instead to redirect users who go to http://blog.yourdomain.com to http://yourblogname.yourbloggingservice.com. You can even "cloak" the redirect so people still see the URL http://blog.yourdomain.com rather than http://yourblogname.yourbloggingservice.com. Just login to your account and go to the Options -> Websites/Redirects screen and in the Create Website section at the bottom, make sure you choose "Redirect to external site" or "Cloaked redirect" in the "Publish as" section. You can even do this for your FastMail.FM username, so http://blog.yourusername.fastmail.fm can be redirected to your blogging service.

These new features now provide enough DNS and URL management features that there should be no need to use a service like ZoneEdit anymore - it can all be controlled from within FastMail.FM.

STANDARD_* labels

Normally when specifying A records you have to specify an IP address, and for MX records you have to specify a priority and a host. For standard FastMail.FM services however, you can use the special mnemonics STANDARD_MX, STANDARD_WEB and STANDARD_MAIL.

There's also another special name, STANDARD_SPF, which can be use for generating SPF records which say "mail is only sent via FastMail.FM". We don't add these by default because many people send outbound email via their ISP or work email systems as well.

  • STANDARD_MX : expands to the appropriate hosts and priorities to use if you want email delivered to our servers.
  • STANDARD_WEB : expands to the appropriate IPs to use if you want to publish from your file storage area to the given hostname. Note that you still have to setup the appropriate mapping in the file storage websites screen.
  • STANDARD_MAIL : expands to the appropriate IPs to use if you want to access the web mail login screen. Note that currently only www.yourdomain.com and mail.yourdomain.com will work correctly with this.
  • STANDARD_SPF : expands to an instruction to include the FastMail.FM servers and reject all others as valid email senders for your domain. Currently this is: v=spf1 include:spf.messagingengine.com -all

By using these mnemonics, you avoid the need for hardcoding particular IPs/hostnames in case they should change in the future.