How to prevent other websites on the same server showing on your domain?


EXPERIENCING PROBLEMS WITH OUR SERVICES? RUN A DIAGNOSE FIRST TO SAVE YOURS AND OUR TIME

Added: 08.09.2009 04:51:37     Last updated: 08.09.2009 04:51:37

The way cPanel works, all websites on the server can be accessed if you know the username. This is why temporarily ULR can be used before the domain has been registered/transferred:
http://cpanelX.proisp.no/~username/

Here the the number of the server the web hosting is located and username is the username for cPanel.

It is also possible to use this method for domains on the server like this:
http://domenepaaserver.no/~username/

username is the username for cPanel for the website you would like to view.

To prevent this you can add the following in .htaccess file:
RewriteCond %{REQUEST_URI} ^/~(.*)
RewriteRule ^(.*)$ /home/username/public_html/ [R=permanent,L]

username is the username for cPanel for your website. The lines over will send everyone trying to view other websites on your domain, to the root of your web hosting.