Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

renec112's avatar

Setting up lets encrypt on forge

Hi. I'm a total server rookie and i'm about to add https with lets encrypt.

All the guides i could find seemed very outdated. The best guide i could find was this: https://sysops.forlaravel.com/letsencrypt

Is this too outdated? would this do? Hope you want to help a rookie out. Thank you :)

0 likes
15 replies
mstnorris's avatar
Level 55

Just tap the button and you're good to go. Nothing else to do! I'm not sure what/where/if you're stuck but simply, here are the steps below:

  1. Log into Forge
  2. Go to the site that you wish to set up the SSL certificate
  3. Select the "SSL Certificates" tab
  4. Tap on "LetsEncrypt (Beta)" button
  5. Make sure that your domains are listed
  6. Tap "Obtain Certificate" button
  7. Once the certificate is installed, then activate it by tapping on the padlock icon at the bottom
  8. All done
2 likes
renec112's avatar

Omg @mstnorris ! Thank you so much.

How did i miss that haha :D Can i ask you, is this what you mean when you say: "Make sure that your domains are listed"? http://imgur.com/a/l5o0u

This "default,www.default" is whats comming when i press "LetsEncrypt (Beta)" button

i'm not sure what to type instead :)

mstnorris's avatar

@renec112 You type your domain... (you need to remove the default.)

So my personal website is https://michaelnorris.co.uk

So in that textbox I add "michaelnorris.co.uk,www.michaelnorris.co.uk" (so long as the "www." is directed to michaelnorris.co.uk)

renec112's avatar

@mstnorris thank you so much. I'm about to go out i so don't dare to do this today.

Will take a look at this tomorrow. Thank you so much for your help. You just made my life 400x times easier :D

1 like
mstnorris's avatar

You're welcome. It really is a 30 second process :) Any issues, just shout.

renec112's avatar

Thanks man. I might do that tomorrow. - I truly appreciate that.

1 like
renec112's avatar

I got it working thank you very much @mstnorris As you said, it was just a 30 second processes.

Now i have to figure out how to edit the .hacces so users get redirected from site.com and from www.site.com :p

Anyways just checked out your website looks awesome - but my browser warns me that your ssl certificate is too old. Just wanted to let you know.

mstnorris's avatar

@renec112 Haha, oops! Must have been before Forge auto-renewed the certificates! All sorted now!

Where did you buy your domain from and where are you hosting your site? I buy all my domains through hover.com and use Digital Ocean to host the sties and also manage the DNS. Why I am saying this is because with Digital Ocean you can map the "www." to the non-www site, so that you don't need to mess around with the .htaccess. :)

mstnorris's avatar

You can't remove the https part, and if "www" and the non-www work, that's all you need to do.

mstnorris's avatar

@grace150506 the answer relates to an old version of Forge.

  1. Log into Forge
  2. Navigate to your site (i.e. select your site from the drop down menu)
  3. Select 'SSL' from the side menu on the left
  4. Select 'LetsEncrypt'
  5. Check your domain name in the input field (make sure that if www.your-domain.com and your-domain.com are actually set up with your DNS provider)
  6. Click 'Obtain certificate'
  7. At the bottom under 'Current certificates' click 'Activate'
  8. All done!
nikocraft's avatar

hi so once this is done I can access https://mysite.com

do I need to tell laravel to run everything over https or will it automatically work? I've done this over a year ago but I forgot the details. Greatfull for any tips in case extra steps are needed after Lets Encrypt has been installed :)

Cronix's avatar
  1. I created a redirect in the nginx config to redirect all non-https traffic to https.
  2. Set APP_URL to use https instead of http
  3. Put \URL::forceScheme('https'); in the boot() method of AppServiceProvider

All my links already were protocol-less, so they just all switched to https since that's what the domain used.

For #1, I just added this first in the nginx conf for the site

server {
        listen 80;
        listen [::]:80;
        server_tokens off;
        server_name www.sitename.com sitename.com;
        return 301 https://sitename.com$request_uri;
}

Please or to participate in this conversation.