How to disable open site with dedicated ip as address?

24x7server

Well-Known Member
Apr 17, 2013
1,911
96
78
India
cPanel Access Level
Root Administrator
Twitter
Hello :),

Try to update following code in your domain .htaccess file to redirect your IP to domain URL.

Code:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^1\.2\.3\.4$
RewriteRule ^(.*)$ http://www.clientdomain.com/$1 [L,R=301]
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,229
463
Hello :)

Yes, the previous post is accurate if you want a redirect to your domain name instead of adding a new VirtualHost for the IP address and seeing the default cPanel pages.

Thank you.