Laravel Forge with Namecheap SSL

Published on by

Laravel Forge with Namecheap SSL image

Laravel Forge makes setting up and activating an SSL super easy. In fact I was able to setup a new SSL certificate in less than 5 minutes. Here are the basic instructions for setting it up in an ideal world:

  • Login to forge
  • Visit the ssl tab for your domain
  • Generate signing request
  • Click “view CSR” and copy it
  • Buy a new SSL cert
  • Plug-in the key and activate

With my limited knowledge of setting up an SSL I missed an important step with the vendor and had to spend a lot of time tracking down the issue.

Namecheap SSL with Forge

Saturday night I decided to get an SSL cert for Laravel News. After the family went to bed I started researching various vendors and finally settled on Namecheap. I’ve heard good things about the company before and the pricing was hard to beat. They offer a very basic single domain cert named PositiveSSL, which is just $9 a year.

That seemed like a good deal for my needs. This site is just content and I’m not selling anything directly. So no need to go over board, right?

I purchased the cert, and seconds later received the email with all the “stuff” I needed. Included in the email was a huge warning:

We strongly recommend that you “click here” for instructions to ensure that your certificate is installed and your webserver is configured correctly.

Just as my luck would have it the “click here” actually went nowhere. Next I noticed at the bottom of the email it included a certificate for copy and pasting. I wrongly assumed I needed to plug this into Forge. When visiting the site in the browser I was getting SSL errors related to a broken SSL chain.

Instead you have to manually concatenate all the files they attached in the email. Running this is easy but it’s not outlined clearly in their documentation.

Generate a cert File

Here is how to get the proper SSL cert file.

Extract the zip included in the email and then cd into the directory and run:

cat YOURDOMAIN_com.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > bundle.crt

Or you can open all these individually and copy and paste them into a new bundle.crt file.

Finally copy and paste the bundle.crt content into Laravel Forge and hit activate. Everything should then be all setup and running.

Eric L. Barnes photo

Eric is the creator of Laravel News and has been covering Laravel since 2012.

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.

image
Laravel Forge

Easily create and manage your servers and deploy your Laravel applications in seconds.

Visit Laravel Forge
Laravel Forge logo

Laravel Forge

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Forge
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
No Compromises logo

No Compromises

Joel and Aaron, the two seasoned devs from the No Compromises podcast, are now available to hire for your Laravel project. ⬧ Flat rate of $7500/mo. ⬧ No lengthy sales process. ⬧ No contracts. ⬧ 100% money back guarantee.

No Compromises
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Bacancy logo

Bacancy

Supercharge your project with a seasoned Laravel developer with 4-6 years of experience for just $2500/month. Get 160 hours of dedicated expertise & a risk-free 15-day trial. Schedule a call now!

Bacancy
Lucky Media logo

Lucky Media

Bespoke software solutions built for your business. We ♥ Laravel

Lucky Media
Lunar: Laravel E-Commerce logo

Lunar: Laravel E-Commerce

E-Commerce for Laravel. An open-source package that brings the power of modern headless e-commerce functionality to Laravel.

Lunar: Laravel E-Commerce
LaraJobs logo

LaraJobs

The official Laravel job board

LaraJobs
Larafast: Laravel SaaS Starter Kit logo

Larafast: Laravel SaaS Starter Kit

Larafast is a Laravel SaaS Starter Kit with ready-to-go features for Payments, Auth, Admin, Blog, SEO, and beautiful themes. Available with VILT and TALL stacks.

Larafast: Laravel SaaS Starter Kit
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit
Rector logo

Rector

Your partner for seamless Laravel upgrades, cutting costs, and accelerating innovation for successful companies

Rector

The latest

View all →
Microsoft Clarity Integration for Laravel image

Microsoft Clarity Integration for Laravel

Read article
Apply Dynamic Filters to Eloquent Models with the Filterable Package image

Apply Dynamic Filters to Eloquent Models with the Filterable Package

Read article
Property Hooks Get Closer to Becoming a Reality in PHP 8.4 image

Property Hooks Get Closer to Becoming a Reality in PHP 8.4

Read article
Asserting Exceptions in Laravel Tests image

Asserting Exceptions in Laravel Tests

Read article
Reversible Form Prompts and a New Exceptions Facade in Laravel 11.4 image

Reversible Form Prompts and a New Exceptions Facade in Laravel 11.4

Read article
Basset is an alternative way to load CSS & JS assets image

Basset is an alternative way to load CSS & JS assets

Read article