0

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

  1. https://example.com/* = Works perfectly
  2. www.example.com/* = Redirects to https://127.0.0.1/* --> I want this to redirect to https://www.example.com/*
  3. 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.