Elia Weiss
Elia Weiss

Reputation: 9886

install www and non-www ssl cert apache

My site (prestashop based) has a certificate for the domain name without the www. After receiving complaints from a client, we wanted to add a certificate for the www.

We are running Apache. What is the best way to install the second cert we just bought? Is it possible to install 2 certificates on Apache for the different host variations, or should I buy a third wild card cert?

Is it possible to easily manipulate prestashop to use the canonical name, i.e. redirect all links to the www version?

Upvotes: 2

Views: 1391

Answers (1)

Pawel Gumiela
Pawel Gumiela

Reputation: 2030

The best way is to buy cert for www.example.com. It works both for and without www.

During the CSR creation put your domain with www (common name (CN) field in the CSR).

According to the geocerts.com:

What is the Common Name (CN) in the CSR?

The Common Name (CN) is the fully-qualified domain name for your web server. This must be an exact match. For example: if you intend to secure the URL https://www.yourdomain.com, then your CSR's Common Name must be www.yourdomain.com.

Should I have a 'www' in my CSR's Common Name?

If you want to secure both the www and non-www version of your site it is recommended that you use 'www.mydomain.comn' in your CSR.

This question may be also helpful:

Should I include 'www' in the common name of a SSL cert request?

Upvotes: 2

Related Questions