Actually, the hosting service I use makes you purchase a dedicated IP address if you're going to use any certificate at all.
Uff, that sucks, I have never seen this shitty practice anywhere I ever hosted. I'd say get a better host =D.
I can already get cross-origin requests without using JSONP. Putting the Header set Access-Control-Allow-Origin
command in the .htaccess of domain B allows cross origin requests to be made, as long as they are over the same protocol.
The problem is not different protocol, but specifically HTTPS => HTTP. With
Header set Access-Control-Allow-Origin
on domain B, you can send ajax request from domain A if both websites use HTTP, both use HTTPS, or A uses HTTP and B uses HTTPS. If A uses HTTPS and B uses HTTP this will not work. Basic idea is that you can load resources using more secure protocol, but not the other way around (that would kinda defeat the purpose of using HTTPS in the first place). Chrome for instance gives this error:
Mixed Content: The page at 'https://a.com' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://b.com/'. This request has been blocked; the content must be served over HTTPS.
I am not aware of any ways to circumvent that, though they might exist. The simplest way is to switch to HTTPS on domain B.
EDIT: If you really can't get HTTPS on domain B, another option would be to get another domain (say C) where you can use HTTPS and use it as a proxy:
https://a.com === AJAX request ==> https://c.com === (send data using your favorite server side language) ==> http://b.com