How do I make nginx stop showing "Welcome to nginx!" and show a site as default?

  • Posted February 23, 2015

I have set up an nginx server with a WordPress site, but if I put the IP address in my web browser, nginx shows the “Welcome to nginx!” page instead of the site that I have installed.

How do I make all browsers coming to the server using the IP address go to my default site?


Did you read my reply on your previous question?

Unfortunately this is no help to anyone else, please link the previous question of provide the answer here.

Poor show guys: @support762221 @lemo443836

yep…removed default from sites-enabled - only the single site shows now


Submit an 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.

First, you can remove or replace that default nginx welcome page. It’s a static index.html file located in /var/www/html.

The following code snippet will redirect any requests for your IP to the domain (after domain.tld is replaced with your domain and [ip address] is replaced with your droplet’s public IP]:

server {
    listen 80;
    server_name [ip address];

    return 301 $scheme://domain.tld$request_uri;