Manual DNS settings

Warning
DNS can be a confusing and complicated system. If you get something wrong, you can bounce email sent to your domain, or cause your domain's 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.

DNS (Domain Name System) is the system used on the internet to translate domain names (e.g. www.example.com, fastmail.com, 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.

DNS also allows other record types which are used for less commonly used services. We support adding custom DNS entries of types: A, AAAA, CNAME, LOC, MX, NAPTR, NS, SRV, SSHFP, TXT.

Default DNS records

If you don't specify custom DNS settings for a domain, then our name servers will publish a set of records for your domain. These can be viewed at Settings → Domains then editing your domain.

These records are suitable for most users.

Custom DNS records

If you know exactly what you want to do, then the domain settings 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 the domains you have set up at FastMail.

This allows you to:

Setup

Follow our domain set up instructions, Once this is done, we will publish default DNS records (see above) for your domain. You can then use the Settings → Domains, edit your domain, then 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.

Wildcard DNS records

FastMail supports wildcard DNS records for subdomains using the standard * placeholder.

Note that wildcards only work for an entire subdomain. You can have *.mydomain.com, but you can't have abc*.mydomain.com.

If you specify a wildcard sub-domain, it's like a fallback value, and any specific entries you provide will override the wildcard. For example, if you have *.mydomain.com, and also specify a record for abc.mydomain.com, then the abc.mydomain.com will be used when doing a DNS lookup on abc.mydomain.com. The *.mydomain.com record will be ignored.

Be aware that a specific entry for a sub-domain will override ALL records for that sub-domain. So if you have A and MX records for *.mydomain.com, and you specify just an A record for abc.mydomain.com, then there will be no MX records for abc.mydomain.com. If you want MX records, you must also specifically add them.

Setting DNS for websites hosted outside FastMail

If you have a website hosted at an external webhosting service, you need to add an entry to the DNS records for your domain to point to this service. Some website hosting providers only give you a CNAME record to point your domain to, not an IP Address.

IP Address web host

  1. Go to the Settings → Domains screen.
  2. Choose the domain you want to edit.
  3. Disable the default A rule for yourdomain.com if this is where your website is hosted. If your website will be hosted at a subdomain such as blog.yourdomain.com, you can leave the default in place.
  4. Add a new A rule using the IP address given to you by your web host.

CNAME only web hosts

Some website hosting places will only give you a CNAME record to point your domain to, not an IP address. This is trickier to set up and you have to be careful.

The core rule is: never set a CNAME record for your top-level domain (example.com), as this will break email delivery for your domain.

Instead, do this:

  1. Add a CNAME record for www.example.com (remember, the www is important) with the value set to your web hosting provider's server name.
  2. Use the Advanced → Websites/Redirects screen to create a redirect from http://example.com to http://www.example.com.

This means anyone going to http://www.example.com will directly access your web host's server, and anyone going to http://example.com will be redirected by us to http://www.example.com.

Redirections

If the service you want to use doesn't support a custom domain, you can use a redirect instead to send users who go to http://blog.yourdomain.com to the hosted service (e.g. http://blog.bloggingservice.com). You can even "cloak" the redirect so people still see the URL http://blog.yourdomain.com rather than http://blog.bloggingservice.com.

To do this, go to the Advanced → Websites/Redirects screen and in the Create Website section at the bottom, choose "Redirect to external site" or "Cloaked redirect" in the "Publish as" section. You can even do this for your FastMail username, so http://blog.username.fastmail.com can be redirected to your blogging service.

DNS TTL (time to live) times

DNS entries have a TTL (time to live) value associated with them, which tells systems how long they can use a DNS value before checking again where the host machine is for a domain.

When you change the DNS nameservers or MX records for your domain, it can take a while before the new values are recognised everywhere. Usually TTL values are something like 10 minutes or an hour, but it can be many days. Once a system has cached a value, there's no way to force it to be cleared, you just have to wait the TTL time for the entry to expire.

Generally this isn't a problem, but it can be worth checking the TTL times on your existing DNS entries at your current DNS host before you change them to us. One way to ensure that the change over is fast is to do the following.

  1. Log in to your existing DNS provider.
  2. Check the current TTL time for your domain (either NS or MX records depending on what you're changing) and note this down.
  3. Change the TTL time for your domain to five minutes.
  4. Now wait for the old time-to-live you noted in step two. This will ensure that the old value expires from all caches on the internet, and any new lookups have the new TTL value.
  5. Make the DNS changes you want (e.g. change the nameservers to point to us).
  6. Wait five minutes (as per the TTL value you set in step 3) for all caches on the internet to have the new values.
  7. Increase the TTL times on your domain again to improve overall performance.