Domain name changing to ip

Posted September 15, 2019 2.6k views


I am having some trouble getting my server to display the web address “” in the url bar. When entered, and searched, it returns the site, but replaces the domain name with the servers IP address. This is with a default installation of ubuntu and default apache server (which works).

I have set up a site once before and I just directed the domain name to the ip and it kept the address in the URL bar.

I also tested in a different browsers.

I have searched for questions specifically for digital ocean and in general. I am no closer to a solution. My domain is with go daddy and I have since move my name servers to digital ocean and this has not resolved the issue.

Please note, I am not using wordpress or anything like that (I noticed many people had problems like this with WP). I haven’t even uploaded the site. I am actually just trying it on a simple html page that says “hello world”.

the IP is
and the domain is

You will see they both go to the same place.

Thank you

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


It looks like you’ve managed to get it working already. When I visit the domain name I can see the ‘Hello World’ message.

Note that it was probably due to the DNS changes that you made, it could take between 1 and 72 hours for the DNS cache to clear over the Globe before you could actually see your changes.


The domain works. its just once the page is loaded, the URL changes from the domain to the IP address.

Never mind. I can see proper address now. Technically you are right I think. I moved dns control from go daddy to digital ocean. Only change I made that could have made it work this morning.