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

mionoeldavis's avatar

Best Practice to allow users to add own domains with SSL Certificate

Hi, I'm currently looking for the best way to allow my users to add their own domains (with a free SSL certificates like Lets Encrypt).

What would you suggest as a solution?

Best Regards

0 likes
5 replies
vincent15000's avatar

To generate free SSL certificates with Let's Encrypt, you have to execute commands manually.

Instead of executing them manually, you can write your own artisan commands and execute them via the web application.

https://laravel.com/docs/10.x/artisan#writing-commands

That way you can let yours users add their own SSL certificates.

To create their own domains, the logic is similar. But it depends on which webhosting you are.

Snapey's avatar

their own domain or subdomain?

Is this a multi tenant solution or does each customer get their own instance?

How good are your bash scripting skills?

Is this a laravel project?

1 like
mionoeldavis's avatar

@Snapey Multi tenant, i want to give the user a whitelabel option so they can brand ther software, for that they should can use their own domain.

martinbean's avatar

@mionoeldavis Usually the customer adds a CNAME record to their domain pointing to your service. Your service will then need to provision an SSL certificate for that domain.

Please or to participate in this conversation.