Cogito ergo sum

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

This website is running on VPS from . 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 (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.

So when I visit it should redirects me to . 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.

About the author

Peshmerge Morad

Data Science student and a software engineer whose interests span multiple fields.

Add comment

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

By Peshmerge Morad
Cogito ergo sum