How to install a stub site on a server

How to install a stub site on a server

Author: HostZealot Team
2 min.

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.

What you will learn about in this article?

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

Create a stub site in ISPmanager

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:

  1. Go to your ISPmanager account, go to the "Domains" section, and then to the "WWW Domains" subsection.
  2. Select New.
  3. Fill in all the fields marked with a red asterisk, as well as all the others, as you wish.
  4. At the very bottom of the list, be sure to check the "Priority" box and click "Ok".
  5. Upload the stub files to the server () - now visitors will see your message.

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.

how to install a stub site on a server

Installing a stub in Apache

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:

mkdir /var/www/

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/

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:

nano /etc/apache2/sites-available/000-default.conf

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 >
   	DocumentRoot /var/www/

Only instead of specify the real IP address of your server, and instead of specify the name of your stub. /var/www/ – this is the path where the stub files are stored.

Here we end our material. Thank you for your attention!

Related Articles