When renting a virtual server, you may encounter a situation where your IP has already been used by someone else. It may have hosted sites, probably had some domains linked to it, or mirrors. When the IP address is assigned to a new server, you might inherit some surprises when a third-party domain is bound to the IP, the web server will receive requests for which there are no settings on the server. The consequence of this will become a problem with the ranking, as search engines will consider these domains copies of your site.
Protecting yourself from such is very simple – you must place a stub site on the server, which will filter orphan domains, not allowing them to affect the work of your main site. This stub site can be made in the form of a simple HTML page with a message to those who by mistake stumbled upon it
To create a stub site through the ISPmanager control panel, you need to create a WWW domain, specifying it as a priority. To do this:
Webmasters familiar with HTML and CSS can easily edit the welcome page to make it a little more informative and presentable. To do this, in the "WWW domains" section, select the newly created stub site, and in the "Catalog" menu, open the file index.html. Here you can change the appearance of the page to your liking.
Users of the Apache web server, which uses the LAMP complex, can also easily install a stub site. First, create a folder for downloading the site files:
Then load the stub files into it in one of the convenient ways. You can use FTP or sFTP protocol to do this. You can also manually create an index.html file by filling it in a console editor – but this is more complicated and less convenient.
When the folder with the stub site files is ready, you will need to set up access to these files on the web server side:
chown -R www-data:www-data /var/www/plug.site
After that, you can proceed to the creation of a configuration file for web server – <VirtualHost>. This file must be placed first in the list of all configurations of sites, otherwise, it will not work. To make it first, add some zeros in its name. For example, in the case of Ubuntu or Debian, all you need to do is edit the default configuration file in the nano editor:
Three zeros in its name will put the file at the top of the list, so it becomes a priority file. The contents of this file must be edited:
<VirtualHost 18.104.22.168:80 >
Only instead of 22.214.171.124.121 specify the real IP address of your server, and instead of plug.site specify the name of your stub. /var/www/plug.site – this is the path where the stub files are stored.
Here we end our material. Thank you for your attention!