SSL certificate on Webfaction

This entry was posted in Security on 2018-09-24 by Eddy

1 – Generate CSR

Go to your webfaction account and generate CSR


2 – Buy SSL Certificate

We will choose Comodo Positive SSL

You can use this website for the best prices:


Select CNAME and copy the CSR

You will get 2 values

3- Add a domain in webfaction

Add a domain using this 2 values.


Once done, you will receive your Positive SSL certificate by email

(It can take few hour for DNS propagation)

4 – Create bundle file

Extract your Positive SSL certificate

Open a command prompt

Go to your extracted folder and use this command:

type COMODORSAAddTrustCA.crt COMODORSADomainValidationSecureServerCA.crt > ssl-bundle.crt

If you use linux, use this command:

cat COMODORSAAddTrustCA.crt COMODORSADomainValidationSecureServerCA.crt > ssl-bundle.crt


5 – Upload certificate

Go back to you webfaction account and add ssl certificate


Certificate is the file domain_com.crt

Private key is the CSR we generate part 1

Intermediate/bundle is the file we generate part 4

6 – redirect HTTP to HTTPS

Create an application named ssl_redirect_<yourdomain>

Create a htaccess file:

RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-SSL} !on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

And upload it in your new application

Create a HTTP website linked to ssl_redirect_<yourdomain> application

Create a HTTPS website who use your website’s application

Now HTTP will be redirected to HTTPS automatically


No results found.

Write comments

Math, for example, 45-12 = 33

Subscribe Now

You will receive a notification to each new article.

Tag Cloud

  • Composer
  • Yii2
  • OpenGraph
  • Helper
  • Wordpress
  • PhpMyAdmin
  • .htaccess
  • Config
  • Production
  • Git
  • Api
  • Mailchimp
  • Github
  • Vue.js