Need Help: Unwanted Redirect from Subdomain *.combind.ma to felicita.ma on WHM/cPanel
Hi everyone,
I'm encountering an issue with my WHM/cPanel configuration and would greatly appreciate any advice or solutions you can provide.
Issue Description:
I have two domains hosted on my VPS server using WHM and cPanel: domainA.ma and domainB.ma. Recently, I noticed that when I try to access https://www.sub.domainB.ma (or any old subdomains), it shows the content of my website felicita.ma. This is unexpected behavior as the subdomain bynora.domain.ma is no longer in use, and I do not want it to redirect to any other domain.
What I've Tried:
- Checked the 'Redirects' section in cPanel for any active redirects - none were found.
- Looked into the .htaccess files for any redirect rules - no relevant rules found.
- Verified DNS settings in WHM for any incorrect records - everything seems normal.
Setup:
- Server: VPS with WHM and cPanel.
- DNS management: Cloudflare
- Affected Domain: Only SSL old subdmains
I am puzzled as to why this redirect is occurring and have not found a solution yet. If anyone has experienced a similar issue or has any suggestions on what else I can check or how to resolve this, your input would be extremely valuable.
Thank you in advance for your time and assistance!
-
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 -
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 -
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.
Comments
3 comments