cPanel autossl with mod_rewrite rules and site verification

autossl cPanel autossl is a free service for cpanel/WHM to give free SSL certificates for domains with an active cpanel license. Like letsencrypt a 90 day certificate is given and ssl certificates are issued when certain requirements are met. Many server administrators have been pushing cpanel for LetsEcrypt to be fully supported but that continues to be pushed back. Comodo though is a good temporary solution however.

Comodo must verify domain ownership using a text file before giving an ssl certificate. Some websites have rewrite rules that will break autossl in cpanel due to rewrite rules.

You may see an ssl in logs such as:

2:19:31 PM WARN The domain “1onlyhost.net” has failed domain control validation (The system failed to fetch the DCV file at “http://1onlyhost.ne/483085.BIN_AUTOSSL_CHECK_PL__.NXFwhqwJq4_GD229.tmp” because of an error: The system failed to send an HTTP “GET” request to “http://1onlyhost.ne/483085.BIN_AUTOSSL_CHECK_PL__.NXFwhqwJq4_GD229.tmp”

One fix is under RewriteEngine on exclude txt/tmp files

RewriteEngine On
RewriteCond %{REQUEST_URI} !\.(txt|tmp)$

The verification will go through now and the certificate will be issued.

You may also refer the following tutorial to know more about free SSL certificate provided by 1onlyhost: 1onlyhost offering free SSL for all cPanel users

Was this answer helpful? 0 Users Found This Useful (0 Votes)