Can't acess my site through url, only by ip

Posted April 3, 2017 8k views
ApacheDNSUbuntu 16.04

I have a brand new Digital Ocean (DO) running Ubuntu 16.04 (this was a Ubuntu 16.04 with LAMP). I’ve installed Wordpress on it using the default configuration.

It’s been 3 days since my DNS are pointing to DO servers, but I can’t access my site through url, but I can access it by typing the IP on address bar.

I’ve add a A record with @ pointing to my droplet, then when I type my url it changes to my IP and I can access the site. Off course, I don’t want this configuration.

My domain is

My apache configuration file is:

<VirtualHost *:80>

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        <Directory /var/www/html/>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        <IfModule mod_dir.c>
            DirectoryIndex index.php index.cgi index.html index.xhtml index.htm


At DO domain panel I have only 3 records with type NS, hostname, value ‘directs’ (X from 1 to 3), TTL 1800

What I’m missing?

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
4 answers

What’s the value of WordPress Address URL and Site Address URL when you look here?

Your domain has no A records.

Hi @JonathanBatista
In the DO control panel, in the DNS section, you need to add A-records pointing to you server for “@” and for “www”

You say “I’ve add a A record” - but where have you done that?

The problem was WORDPRESS!
I don’t know why but Wordpress configurations was pointing to my ip instead of my domain

It is now solved!