Please assist with hosts setup

Posted January 24, 2015 4.1k views

Hi all

I have an Ubuntu droplet.

Let’s say my domain name is

My current etc/hosts file looks like this:

# Your system has configured 'manage_etc_hosts' as True.
# As a result, if you wish for changes to this file to persist
# then you will need to either
# a.) make changes to the master file in /etc/cloud/templates/hosts.tmpl
# b.) change or remove the value of 'manage_etc_hosts' in
#     /etc/cloud/cloud.cfg or cloud-config from user-data Mywebsite Mywebsite localhost

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Now according to

It should look like this: localhost.localdomain localhost hostname.yourdomain.tld hostname
YourIP hostname.yourdomain.tld hostname

Can you translate that using my domain name, assuming my IP is

Am I missing something?

I am using DO DNS servers.



These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Perhaps you missing your real IP address in host file config

type ifconfig in your shell, your network configuration would be displayed like:

eth0      Link encap:Ethernet  HWaddr ########
          inet addr:  Bcast:  Mask:

Add this IP address and domains assigned to it (including subdomains) should help.


Public IP address hostname.domainname.tld