1

In an older Stackoverflow thread (https://stackoverflow.com/questions/20450676/will-using-http-and-https-on-the-same-domain-affect-seo) I learned that you can run two different websites from the same domain one with an HTTP protocol and the other with an HTTPS protocol. My web host says this doesn't work.

My example http://www.csd-i.org https://www.csd-i.org

The reason that I want to do this is that I want to split our somewhat old website in half. One half (the HTTP half) would be the existing membership portion of the site - for which I don't want to have to change all the link URLs. The second half (the HTTPS half) would be a modern version of the public side of the website that would have an SSL certificate and would be mobile responsive.

Question one: does it work?

Question two: how does one set this up?

womble
  • 97,049
Tim Magee
  • 11
  • 2
  • 7
    You can do this, but please don't. – Ignacio Vazquez-Abrams Jun 23 '18 at 20:09
  • 2
    Standard protocol is that all websites should run with https now anyway. Perhaps reconsider your need to do this. – Christia Jun 25 '18 at 06:24
  • 2
    Just modernize your site and redirect HTTP transparently to HTTPS. – Zac67 Jun 28 '18 at 05:45
  • 1
    It's not worth adding as an extra answer, but I did this some years ago and now really regret it, as it is making it very hard to consolidate my entire site on https (this being modern best-practice). What everyone else is saying - that this is a bad idea - is true. – MadHatter Jun 28 '18 at 06:32

2 Answers2

4

I agree with Igancio, not sure why you'd really want to do this. But mine is not to question why...

In Apache you would simply define two different VirtualHost Sections with two different DocumentRoot's defined. Something like:

<VirtualHost *:80>
  DocumentRoot /var/www/oldSite
</VirtualHost> 


<VirtualHost *:443>
  DocumentRoot /var/www/newSite
</VirtualHost> 
Joe M
  • 311
3

This would be technically possible but doesn't work at all in practice. No-one would type the extra https:// needed, causing them to land on the legacy page.

Follow the best practices, instead:

  • Create some http://old.example.com for the legacy site. Consider adding TLS to this site too, as there's user information and logins involved.
  • Fix the broken links. (Also, a reverse proxy might become handy.)
  • Redirect from http://example.com (and www) to one canonical https:// URL.
  • Add HSTS headers.
Esa Jokinen
  • 49,773