I have a website that hosted in a shared hosting. I bought a ssl cert but shared hosting do not install ssl from other providers. I also have a VPS.

is it possible to host SSL version of my website in that VPS and continue hosting non-SSL version in shared hosting? is it possible via DNS settings?

closed as off-topic by Jenny D, Ward, HBruijn, HopelessN00b, MadHatter Sep 2 '14 at 10:49

This question appears to be off-topic. The users who voted to close gave these specific reasons:

  • "Questions must demonstrate a minimal understanding of the problem being solved. Try including attempted solutions, why they didn't work, and the expected results. See How can I ask better questions on Server Fault? for further guidance." – HBruijn, HopelessN00b, MadHatter
  • "Questions must be relevant to professional system administration. Server Fault is dedicated to professional system and network administrators. End user and enthusiast questions are off-topic (contact your system administrator or hire a professional to help you out). Please see the Help Center for more information." – Jenny D, Ward
If this question can be reworded to fit the rules in the help center, please edit the question.


It is not really possible to do this if both sides should share the same hostname (e.g. http://www.example.org and https://www.example.org), because this name will resolve to the same IP address independent of http or https. In theory you could forward all traffic on port 80 on your VPS to the shared hosting, but this would introduce lots of overhead (for forwarding data for port 443 from the shared host to the VPS you probably don't have the rights).

But, if you could use different hostnames (like http://www.example.org vs. https://ssl.example.org) this would be possible if you have control over the DNS settings.

  • I am not sure I agree that a simple TCP forwarding introduces "lots" of overhead. If I look at how much that stuff my low end routers do (processor wise) that sounds quite doable. – TomTom Aug 27 '14 at 12:03
  • Using a container based VPS you have to forward the data in user space because you will not be able to add your own iptables rules. Or you have a real virtual machine (KVM, vmware etc) where you can add iptables rules, in which case the data need to be forwarded from the host system to the VPS and then back to the host system. All this introduces much more overhead than a simple kernel copy or even hardware based copy inside a dedicated router. – Steffen Ullrich Aug 27 '14 at 13:19
  • Well, all I can tell ou is that all incoming traffic on my companies (smaller) websites coems through a reverse proxy that is in a virtual machine (as is the web server) and we have no problemswith this. – TomTom Aug 27 '14 at 13:35
  • I think it boils down to what you consider "lots of overhead". Compared to forwarding inside the kernel a reverse proxy is lots of overhead, but if the systems are powerful enough or the load is low you will not notice much of this overhead. But if you measure you will probably notice more latency, even more if VPS and shared site are hosted at different providers. – Steffen Ullrich Aug 27 '14 at 15:35

I know three solutions, but none of them can be expected to work great.

  • Point the domain to an IP address, which you control. Forward the port from there to where the site is hosted. Ideally this would be done using DSR, but that is probably not supported by the shared host.
  • Use SRV DNS records. This would be the ideal solution. The problem is, that the majority of browsers have no support for SRV records.
  • Put both IP addresses on your domain and count on clients to notice that one gives a RST and then use the other.

Why not host both versions of the site on your VPS? I think hosting both versions on the VPS is going to work better than all three other ideas, I have proposed.

Not the answer you're looking for? Browse other questions tagged or ask your own question.