Resellers: Custom Login Page
Important: You must have the WildCard SSL Certificate installed on your account for this to work. Please see Resellers: Installing the Wildcard SSL to see how to install the SSL Certificate.
Set Up the .htaccess File
For your custom login page to work, you will need to ensure that the .htaccess file in your home directory is set up correctly. There are two ways of doing this.
Use the Reset login domains tool in WHM
Warning! Using this tool will replace the .htaccess file in the home directory.
- Login to your Bluehost reseller account
- Choose WHM
- Scroll down to the Plugins section
- Click the Reset login domains plugin.
- Click Yes to replace the .htaccess file in your home directory, removing any custom code that might be there now.
Manually modifying the .htaccess file
If you would prefer to modify the .htaccess file manually, located in the home directory, here is the code you will need to use:
# This is the code that handles login., cpanel., and webmail.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^login\. [NC,OR]
RewriteCond %{HTTP_HOST} ^cpanel\. [NC,OR]
RewriteCond %{HTTP_HOST} ^webmail\. [NC]
RewriteCond %{REQUEST_URI} !^/(cgi-sys|rhost_login)
RewriteRule ^(.*)$ /cgi-sys/login.cgi [NC,L]
Note: Any changes to this code will cause the login process to fail.
Creating the Custom Login Page
The custom login page will need to be placed in the ~/public_html/login/default.html file. Your customers would log in at http://example.com/login/.
The following are the required lines that must be included in your form. You may style the page as you wish, but the following information must be included.
<form action="/cgi-sys/login.cgi" method="POST">
The form action must be /cgi-sys/login.cgi, and the method must be POST.
<input class="lti" name="user" value="">
The user field - the name must be user. Class and value are optional; the value should be set to "" if used at all.
<input class="lti" name="pass" type="password" value="">
The pass field - the name must be pass, and the type must be password. Class and value are optional; the value should be set to "" if used at all.
<input type="hidden" name="goto_uri" value="/cpanel">
The name must be goto_uri, the value must be "/cpanel" including the preceding /, and the type must be hidden. If this field is not present or set properly, the login will not work.
<input id="login_button" type="submit" value="Login">
The submit button - type must be submit, however any other attributes can be modified.
<span class="error" id="general_error"></span>
This tag is optional but highly recommended. Any errors generated during the login process are sent to this element. You may stylize this as you wish, but the ID must be general_error.
If you need further assistance, feel free to contact us via Chat or Phone:
- Chat Support - While on our website, you should see a CHAT bubble in the bottom right-hand corner of the page. Click anywhere on the bubble to begin a chat session.
- Phone Support -
- US: 888-401-4678
- International: +1 801-765-9400
You may also refer to our Knowledge Base articles to help answer common questions and guide you through various setup, configuration, and troubleshooting steps.