Skip to main content

Need Help: Unwanted Redirect from Subdomain * to on WHM/cPanel



  • cPRex Jurassic Moderator

    Hey there!  I removed the public links and domains from your post for security reasons.

    I would check the cPanel >> Domains tab and see if the domain is configured there in some way.  If there is an Alias setup, this would explain the behavior of one site pointing to another.

  • Herri omar

    Yes, thank you for your suggestions. Upon further investigation, this is how i managed to resolve the issue to some extent.

    Resolution of the Shared SSL Certificate Issue:

    I discovered that there was a shared SSL certificate (and possibly an alias setup) pointing to To address this, I made the SSL certificate for the primary one.

    Handling the Subdomain Redirect Issue:

    However, I encountered a subsequent issue. Whenever I added a new subdomain to with HTTPS access (like the URL in my first post), it redirected to the main website of To resolve this, I took action in my Cloudflare account. I removed the DNS record (*) that was pointing to my server's IP address. This adjustment seems to have mitigated the problem.

    Additionally, could someone explain why adding a new subdomain with HTTPS in WHM/cPanel results in it redirecting to the main site instead of not showing anything, and if this is linked to the shared SSL certificate configuration? If i can remove the shared certificate or not ?

  • cPRex Jurassic Moderator

    It's likely because the domain didn't have enough time for AutoSSL to issue a certificate.  When this happens, Apache will serve the closest-matched vhost that it can, which would be the main domain.  You can create a default SSL vhost to keep this from happening:


Please sign in to leave a comment.