: Ssl subdomain shows content of main site but does not redirect url (wildcard cert) I have a wildcard cert installed on my site *.pcgcp.ca which works beautifully, but when I go to my subdomain
I have a wildcard cert installed on my site *.pcgcp.ca which works beautifully, but when I go to my subdomain store.pcgcp.ca with HTTPS it shows the content of the main pcgcp.casite. I have contacted my host (it's a Bluehost shared hosting account) several times but every time they have no clue.
I tried disabling the .htaccess but I get the same problem. I also tried clearing cache, checking databases and files, and I have even tried this with subdomains that don't exist; still it shows the main site content.
I can't seem to find the problem. What can I do?
More posts by @Lengel546
2 Comments
Sorted by latest first Latest Oldest Best
Try this in the htaccess code file in your roots folder
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ yourdomain.com/ [R=302,L]
If that doesnt work then purchase a dedicated IP address from your hosting provider as hosting-only means you are using a shared IP address and therefore you are not allowed to use Wildcard SSL's or HTTPS'S. Sorry for the inconveniance.
As a hosting-only plan, it's unsurprising that your server is set to display the same content for all subdomains of a primary domain. You're paying for space to host a website, not multiple websites.
You could try some fancy .htaccess rewrite rules and return different content for different subdomains, but you may fall foul of your hosting contract if they notice, and that could leave you with zero websites.
Your safer bet is probably to contact your host and ask them to configure this for you (it would be at the Apache config level, below the level you can access) or set up a second hosting account for the second website.
On a side note, perhaps you could look into hosting your store as a subdirectory instead of a subdomain. This would allow everything in one hosting account, and give the SEO benefit of building up one website for search engines to crawl instead of splitting your resources.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.