HostMonster Web Hosting Help

Wildcard SSL Certificates

Summary

This article will show you how to use your WildCard SSL Certificate, on your HostMonster hosting account, using mod_rewrite. This is required due to a limitation in WHM that only allows there to be one vitualhost entry.



Accessing the .htaccess file

The .htaccess file is located in the public_html folder. While you can use an FTP or SSH client to access the file, for this article we will be using the File Manger.
  1. Login to your HostMonster cPanel
  2. Click the "File Manager", located in the Files section of the cPanel.
  3. File Manager
  4. Choose to open the "Web Root (public_html/www)"
    Web Root

    Be sure to check the box "Show Hidden Files (dotfiles)."

  5. Show Hidden Files
  6. Right click the .htaccess file and choose "Edit" or "Code Edit

Setup the mod_rewrite rule

You will need to copy the following text into your .htaccess file. Please pay close attention to the comments (lines starting with #) so that you can properly setup the rewrite for your subdomains.

subdomain with your subdomain and maindomain.com with your domain name.

# HostMonster.com
#.htaccess WildCard SSL
RewriteEngine On
RewriteCond %{HTTP_HOST} ^subdomain.example.com$
RewriteCond %{REQUEST_URI} !^/subfolder/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /subfolder/$1
RewriteCond %{HTTP_HOST} ^subdomain.example.com$
RewriteRule ^(/)?$ subfolder/index.php [L]

Once you have modified this code you may need to clear your browser cache to be able to see the redirect.

Knowledgebase Article 29,259 views bookmark tags: htaccess reseller ssl subdomain subfolder wildcard (updated 149 days ago)


Was this resource helpful?

Did this resolve your issue?


Please add any other comments or suggestions about this content:





Recommended Help Content

How to renew an existing SSL certificate--or purchase a new one, within your cPanel (updated 49 days ago)
Knowledgebase Article 32,466 views tags: cert certificate layer secure security socket ssl

Do you support wildcard subdomains or wildcard DNS entries? (updated 575 days ago)
Knowledgebase Article 69,516 views tags: dns domain subdomain wildcard zone

What files do you need to make your SSL certificate work on another account/server? (updated 833 days ago)
Knowledgebase Article 15,310 views tags: certificate move ssl

Related Help Content

How to add a new SSL certificate for your different WM services. (updated 352 days ago)
Knowledgebase Article 6,936 views tags: ssl whm

I need to have an SSL 3rd Party Certificate installed for my domain. (updated 76 days ago)
Knowledgebase Article 115,878 views tags: certificate ssl

To help with installing an SSL certificate for an account on a dedicated server through the WHM (updated 177 days ago)
Knowledgebase Article 17,158 views tags: assign dedicated reseller server ssl whm

How do I use the free shared SSL Certificate? (updated 524 days ago)
Knowledgebase Article 151,511 views tags: certificate path shared ssl

How to reset the SSL certificates for your servers services (updated 35 days ago)
Knowledgebase Article 561 views tags: ssl whm

SSL/TLS Certificates and Addon Domains. (updated 371 days ago)
Knowledgebase Article 35,145 views tags: ssl

I need to have an SSL Self-Signed Certificate installed for my domain. (updated 364 days ago)
Knowledgebase Article 53,381 views tags: secure ssl

Where do I get a copy of the site seal for my SSL I purchased through HostMonster? (updated 636 days ago)
Knowledgebase Article 98,762 views tags: cert image logo seal secure ssl