Question About A Domain And A Subdomain With Ssl

Discussion in 'Site & Server Administration' started by svinjica55, Jan 27, 2013.

  1. #1
    Hello.

    I have a few problems with my setup and I would like some suggestions.

    I started a website on which I will offer some services and because of that I will need a gateway for support. For that I need a subdomain which has a SSL Cert on it.

    So, I have a basic shared hosting plan with a dedicated IP address and 1 SSL Certificate on that account. I have a website (let's call it mywebsite.com) and a subdomain (let's call it secure.mywebsite.com).

    mywebsite.com is just an example as i would like for my service to remain unknown since it is not live yet.

    I would like to assign a few rules for both of my domain names.
    1) if you try to access https://mywebsite.com you get redirected to http://mywebsite.com (right now when i go to https://mywebsite.com i get a warning from firefox and chrome)
    2) if you try to access http://secure.mywebsite.com you get redirected to https://secure.mywebsite.com (right now if i try to access https://secure.mywebsite.com i get to this address http://mywebsite.com/secure or i just get to http://secure.mywebsite.com)

    I have talked to the support from my hosting company and they told me that the only way i could accomplish this is if i buy another hosting account and setup my main page (http://mywebsite.com) on that account and setup my secure page on the first account. Can a subdomain and a domain name be hosted on different accounts?

    Is there a simpler way to do this?

    I really appreciate your help, thank you.
     
    svinjica55, Jan 27, 2013 IP
  2. MilesWeb

    MilesWeb Well-Known Member

    Messages:
    869
    Likes Received:
    35
    Best Answers:
    7
    Trophy Points:
    173
    #2
    1. As SSL is hosted based you will receive an error mywebsite.com. It will only work on secure.mywebsite.com. For mywebsite.com to show valid SSL, you will have to purchase one.
    2. What you can do is get the DocuementRoot for the sub domain set to the one outside your public_html. About the redirects, you can have them setup the way you want in .htaccess file.

    Yes, you can host 2 different accounts for the main website mywebsite.com and it's sub domain secure.mywebsite.com on the same server.
     
    MilesWeb, Jan 27, 2013 IP
  3. ironcladservers

    ironcladservers Well-Known Member

    Messages:
    389
    Likes Received:
    20
    Best Answers:
    4
    Trophy Points:
    115
    #3
    Your host is asking you to get something you don't need. You can host the two on the same server, no problem. The 1 SSL certificate you have will be for the "secure.mywebsite.com" subdomain. To do the redirects just make a couple ".htaccess" redirects to suit your needs, and place it in the main account's root folder. For the subdomain, you should be able to create it using the hosts' control panel.
     
    ironcladservers, Jan 27, 2013 IP
  4. svinjica55

    svinjica55 Member

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #4
    So this is not possible if I can only use 1 IP address on my cPanel account and I need that 1 IP for the SSL Cert (for a subdomain) and another IP for my main site?
     
    svinjica55, Jan 30, 2013 IP
  5. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #5
    digitalpoint, Feb 1, 2013 IP
  6. Roger Pelt

    Roger Pelt Active Member

    Messages:
    121
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    53
    #6
    I am not sure what exactly you want, here I have tried to provide solutions based on what I understand from your given post.

    As you stated, domain.com that is not secure is throwing error when you open with https {://} mozilla.org right? It will always throw error as; browser will not find security certificate for non-secure domain and when you open with HTTPS, it will show error of SSL connection.

    Same with the case of https://blog.mozilla.org/ as you have secured this domain with SSL and it can work with HTTP without error.

    Here are few points that can help you to overcome this issue:
    • You should buy wildcard SSL to protect your main domain and sub-domain. Here it is not necessary to host them on different IP or on different servers.
    • If you have host them on shared server, you should have dedicated IP to install SSL on your domain.
    I hope I have answered your query..
     
    Roger Pelt, Feb 6, 2013 IP
  7. Roger Pelt

    Roger Pelt Active Member

    Messages:
    121
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    53
    #7

    mozilla.org is just an example...
     
    Roger Pelt, Feb 6, 2013 IP