Report this

What is the reason for this report?

Apache HTTPS site DISabled, but still being redirected to it at the www (non-www works)

Posted on December 2, 2014
robw

By robw

This isn’t the most beautiful VirtualHost, but I’ve tried just about everything else. I moved one HTTPS domain to another HTTPS domain (same IP), and want to send all traffic to the old domain to the HTTP site. When I run curl -I example.com and curl -I www.example.com I get the same response, but when I go to the websites in any browser, I’m prompted with a “Your connection is not private” error message.

<VirtualHost *:80>
  ServerAdmin web@my-website.com
  ServerName www.my-website.com

  <Directory /home/my-website/old>
    AllowOverride all
    Options -MultiViews
   </Directory>

   DocumentRoot    /home/my-website/old/
   ErrorLog        /home/my-website/shared/log/error.log
   CustomLog       /home/my-website/shared/log/access.log combined
</VirtualHost>

<VirtualHost *:80>
  ServerAdmin web@my-website.com
  ServerName my-website.com

  <Directory /home/my-website/old>
    AllowOverride all
    Options -MultiViews
   </Directory>

   DocumentRoot    /home/my-website/old/
   ErrorLog        /home/my-website/shared/log/error.log
   CustomLog       /home/my-website/shared/log/access.log combined
</VirtualHost>

I feel like this might be a DNS cache issue somewhere along the lines, but I don’t know how to debug that or confirm my suspicion.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

If you had issued a Strict-Transport-Security header at some point your browser saves this information and will reject connecting over plain HTTP in the future, try clearing all browser data.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.