Site works with www but shows insecure connection for naked domain (how to properly setup https redirect)?

[ad_1]

I have a site hosted on bitnami wordpress instance. When I visit `https://www.mysite.com`, no issues. When I visit `https://mysite.com` I get `Insecure connection – ERR_CERT_COMMON_NAME_INVALID`

My SSL certificate shows the following for Common Name:

Common Name *.mysite.com

curl output:

* `curl -I mysite.com` used to give me the following output

“`

HTTP/1.1 200 OK
Date: Mon, 03 Oct 2022 11:20:03 GMT
Server: Apache

“`

* I tried following [this guide])
– `curl -I mysite.com` now gives me the following:

“`

HTTP/1.1 302 Found
Date: Mon, 03 Oct 2022 11:12:55 GMT
Server: Apache

“`

* Ideally I want it to show (?):

`HTTP/1.1 301 Moved Permanently`

Where is my mistake?

I suspect it’s a redirect issue, but I’m kind of stuck in a loop here.

[ad_2]
2 Comments
  1. I’d do this either with a WP plugin or in htaccess in the root of your WP installation, both options discussed here,

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer