2.4.4. Restrict access to site

You can restrict access for specific IP addresses or subnets in the following ways:

You can restrict access for visitors from specific countries in the following ways:

Attention!

If you disallow indexing, the site will disappear from search engine results.

In the site root directory, create a robots.txt file with the following content (for more details, see robots.txt): User-agent: * Disallow: / </code>

You can display a placeholder (a specific piece of HTML code) instead of the site in the following ways:

  • Configure a redirect to a specific file using .htaccess (instead of example.php, specify the desired file):
    RewriteEngine on
    RewriteCond %{REQUEST_URI} !^/example.php$
    RewriteRule .* /example.php [L]
Content

    (1)