Preventing Domain from using VPS IP Address and Display its content [closed]

how can i prevent user from displaying contents of my vps. Currenty, I have an Ubuntu-powered vps and I install wordpress blog on it which is intended for my I know its possible to use the VPS IP to another domain by adding an A record which points to the IP. But i have a and when i add an A Record to it. It will display the blog from and also, when I try to key in IP address to the browser, I can see the blog I made. How can I specify its content that is viewable only for that particular domain?


Your VPS runs a web server (Apache, nginx or similar) and the web server needs to be setup to “handle multiple domains”. In more technical terms you need to setup some virtual hosts or vhosts to serve each of the domains you want to host.

If you only have one IP address you will need to do name-based vhosting where the web server decides the content based on the hostname the user types into his/her browser. E.g. you will have one vhost for and one vhost for If someone sets up their own DNS and makes point to your VPS then they will be served the default vhost. It is configurable which one is default.

See here for Apache name-based vhosting:

If you are not using Apache tell us what you use.

Source : Link , Question Author : user3541736 , Answer Author : Wuhtzu

Leave a Comment