Ho I Can make my web server accessible from domain, but also on direct IP

Hi guys, is possible to make my webserver accessible using 1 domain but, also can accessible also using IP address (example, how I accomplished that

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @caknoris696:

It is possible to make your website accessible using your domain and IP. You just need to declare both your domain and IP in the server block of your Nginx configuration file as below:

server {

    server_name  your_domain;


You can read the following tutorial, especially Step 5 – Setting Up Server Blocks, for more details: