For example: I host 4 websites on Ubuntu Server ( with Nginx. Now, when somebody open browser and enters IP of my server how should I handle that kind of request. What admins mostly do with that ? I know ordinary users will never enter IP.


1 Answer 1


When the server is shared among multiple domains, I've used to create a static page that handles all non-existing Host: headers, including the plain IP. The page may for example inform that this virtual host is not configured and possibly advertise the hosting service.

If the server is dedicated for hosting only one domain, I'd suggest a permanent redirect to the canonical hostname instead of serving the same site with all possible hostnames. That would be good for search engine optimization and TLS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.