Skip to main content

Is it possible to enable the SSL only queries in cPanel DDNS feature?



  • cPRex Jurassic Moderator

    Hey there!  There isn't a way to do this in the interface, but adding the following code to the Apache pre_main_include file does get this working:

    RewriteCond %{REQUEST_URI} cpanelwebcall
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]

    I would say this is a relatively-unofficial solution, so please test that this will work in your environment before deploying it to production.

  • edmpn


    I inserted that code in my .htaccess file, as it controls all my redirects (I don't know if it is what you'd mean by "pre_main_include).
    Nevertheless I think I had misunderstood the cPanel DDNS concepts, i.e., even if a person try to access my URL using http or https he will update the IP, as he doesn't need to have the public key of my certificate.
    The only security here consist in not disclosing the DDNS URL, but even so it not really true security.

    Thanks by our answer!

  • cPRex Jurassic Moderator

    These include files would be in the /etc/apache2 directory - you can read more about them here:


Please sign in to leave a comment.