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

fastxpert's avatar

Let's Encrypt for domain and subdomain in same app?

I have my laravel app runing on a digital ocean instance. I use there Let's Encrypt to have secure connection. Now I want in the same laravel app to make a new part for subdomain like: time.myapp.com.

My question is, can I use Let's Encrypt also for my subdomain, if I create a new virtualhost, can I target it on the same directory without to have problems with SSL?

0 likes
2 replies
ano95's avatar

Yes, you can. SSL is not handled by Laravel, but web server is handling it.

Snapey's avatar
Snapey
Best Answer
Level 122

Yes, if the site is a separate apache or nginx virtual server then you can have a certificate for each.

In 2018 Lets Encrypt will start to allow wildcard certificates so that *.myapp.com can be looked after by a single cert.

Please or to participate in this conversation.