Website unreachable through domain name

August 8, 2017 836 views
DNS Ubuntu 16.04

My website url is:
It is reachable using droplet ip address but not working with the domain name.

Nameservers set at GoDaddy are:

DNS records at DO:

Type: A
Hostname: *

Type: A

www is an alias of

Help please!

2 Answers


Please post your virtual host so we can make sure your settings are correct.

If using apache2 web server you can find it here /etc/apache2/sites-enabled
and if using nginx you can find it here /etc/nginx/sites-enabled


First install Nano

sudo apt-get install nano

Then use this command to make a new file in the /etc/apache2/sites-available directory.

sudo nano /etc/apache2/sites-available/

Then this is one of many examples on the Apache documentation which you can edit to meet you needs.

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

Once you've saved that using nano then type


From there you should see your domain in the list and then you type that domain you want to add to sites-enabled.
You will also want to restart or reload the apache2 service after you have done that step by

sudo service apache2 restart

Now you should have a working site on both www and non www

Have another answer? Share your knowledge.