How to setup FQND hostname when using a DNS wildcard A record?

May 7, 2016 1.2k views
DNS Networking Ubuntu

Following this tutorial How To Set Up a Host Name with DigitalOcean, my droplet is setup as:

Droplet IP:
Droplet name: example1


A record name: @
A record IP:
A record: 1800 IN A

CNAME name: *
CNAMe hostname: EXAMPLE1.COM.

$ hostname

$ hostname -f

$ cat /etc/hosts localhost example1

I know is tricky, but I will add a MX record and setup Postfix, Dovecot etc. on the same droplet.

Can I just add to /etc/hosts, something like " mail1" or that will not work?

Will I get in trouble with that DNS wildcard A record?

Thank you,

PS: I'm not using IPv6

1 Answer
JamesMC June 22, 2016
Accepted Answer


You should be fine setting up the hostname record you offered. You will also want to likely name the droplet as well, so your PTR shows up as that instead of example1.

The PTR of your IP address is based on the droplet name, and plays an important part of mail delivery.

Have another answer? Share your knowledge.