Unable to point domain name to digital ocean Wordpress droplet ip address

Posted May 12, 2017 5.2k views
WordPressDigitalOceanDNSCMSUbuntu 16.04

Hey guys I’m having a problem pointing my digital ocean Wordpress droplet to a domain name I have. I’ve already been through this tutorial and at the moment: , ,
or anything else before will redirect to my
droplet’s ip address [ ].

However If I try i get redirected to which gives me an error page that says

This site can’t be reached refused to connect.

Not sure if it has something to do with the https, any help would be great.

** Also yes I did make an A record to also connect my IP to a domain name with nothing before it for *

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


If WordPress was installed using the Droplet IP, then WordPress is using the IP address pulled from the environment/URL/headers. To change the URL that WordPress uses, the easiest method would be to edit wp-config.php and add in:


Change to your domain in each define(). You’d then refresh the page and that’ll set the domain that WordPress uses to your domain.

Once the domain is updated, you may need to make one more change and that’d be to Apache and the VirtualHost block that your domain uses.

Your VirtualHost blocks are located in /etc/apache2/. You’d need to change the IP being used for the host to your domain and then restart Apache using:

service apache2 restart

As long as your DNS is correct, that should fix issues with your domain not working.

  • Thanks for the help it didn’t work and I ended up not really using my digital ocean droplet but I appreciate you answering.

  • This did the trick for me. Except, I didn’t fully understand the VirtualHost blocks procedure. I went to the /etc/apache2/ folder, but it was unclear what file I am supposed to edit. So, I restart Apache and tested WordPress on Edge, Brave, Firefox, and Chrome. This resolved the CSS rendering issue I was having as well.

    Thank you!

I’m having the same issue.