How to make Domain Name appear in browser address bar instead of IP address

August 19, 2014 2.9k views

I followed the directions at https://www.digitalocean.com/community/tutorials/how-to-set-up-a-host-name-with-digitalocean for setting up a host name with digital ocean. However when I visit my domain name (www.domain.com) it opens up the website but then the ip address appears in the address bar instead of the domain name. How do I change this so only the domain name appears?

3 comments
  • Hi! Could you pastebin your Apache configuration? What kind of site is it? Any details you could provide would make it easier for us to help.

  • Is this a wordpress site? If so, that information is stored in the database, in the wp_config. You can fix it with this query (modify for your needs before using):

    UPDATE wp_options SET option_value='http://domain.com' WHERE option_name IN ('siteurl','home');
    
  • @JonsJava your solution worked for me since I was dealing with a wordpress site, thanks!

1 Answer

This question was answered by @JonsJava:

Is this a wordpress site? If so, that information is stored in the database, in the wp_config. You can fix it with this query (modify for your needs before using):

UPDATE wp_options SET option_value='http://domain.com' WHERE option_name IN ('siteurl','home');

View the original comment

Have another answer? Share your knowledge.