Report this

What is the reason for this report?

How to bind IP address to domain?

Posted on August 2, 2017

Hi, I can add domain to my dropplet using virtual host, but how can I point my IP address to the domain, let’s say my domain is example.com, my IP address 111.111.111.111, now what I want is if I put 111.111.111.111 on browser, it will open example.com.

Thanks



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

It seems I work it out, by creating virtual host with that IP address as a name, and example.com as the alias, pointing the same directory as example.com.

My bad, what I mean is when I open 111.111.111.111 it will stay opening that IP address, but the content is similar to example.com

I have the opposite issue, the droplet IP shows one of the site not the default one ;)

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.