How to solve “http doesn’t redirect to https”1 min read

This website is running on VPS from Linode.com . I have configured every single detail about the site, and as you have noticed that the website has only one version with https. I have only peshmerge.io (non-www) version. This morning I have clicked on the link of my website on my twitter profile and what I saw is the default Apache2 page which you get after installing Apache on Ubuntu.

cat-surprised
So when I visit http://peshmerge.io it should redirects me to https://peshmerge.io . But that wasn’t the case. I started checking everything on my server. I have checked every line of the configuration file located in /etc/apache2/sites-enabled/mysite.conf It seemed to be correct. Then I have checked the content of .htaccess in my wordpress installation and it was also fine.

After a long research (one hour) I could address the problem. The problem was that my default 000-default.conf file wasn’t disabled. I have disabled it using the following command:
sudo a2dissite 000-default.conf 

The problem is solved. But remember if you face the same problem, you have to check first your apache config files or htaccess  files.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Peshmerge.io-logo
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.