Skip to main content

Need Help: Unwanted Redirect from Subdomain *.combind.ma to felicita.ma on WHM/cPanel

Comments

3 comments

  • 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.

    0
  • 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 felicita.ma. To address this, I made the SSL certificate for combind.ma the primary one.

    Handling the Subdomain Redirect Issue:

    However, I encountered a subsequent issue. Whenever I added a new subdomain to combind.ma with HTTPS access (like the URL in my first post), it redirected to the main website of combind.ma. 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 ?

    0
  • 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:

    https://support.cpanel.net/hc/en-us/articles/1500005458561-How-to-set-the-default-HTTPS-VirtualHost

    0

Please sign in to leave a comment.