SSL noob & WP mid-experience here. I registered a Lets Encrypt certificate for www.example.com and example.com.
There are three scenarios that I need help with:
Note: 127.0.0.1 = placeholder for my server IP
- https://example.com/* = Works perfectly
- www.example.com/* = Redirects to https://127.0.0.1/* --> I want this to redirect to https://www.example.com/*
- example.com/* = Redirects to https://127.0.0.1/* --> I want this to redirect to https://example.com/*
I am using Wordpress, ubuntu 18, and apache. Things I tried:
- I tried the define function in wp_config.php. Didn't work
- I made sure the site url and wordpress url in the wp dashboard was correct.
- I don't want to use .htaccess
- I have access to apache files, so I can edit apache2.conf and site.conf. I tried Redirect and RedirectMatch.