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

1k3r's avatar
Level 6

Migrating my Laravel server with zero HTTPS downtime – best practices?

Hi everyone,

I’m planning to migrate my Laravel application to a new server. I’m using Laravel Forge to manage my current server, which works fine, but I want to upgrade the instance for better performance.

My main concern is HTTPS. The current certificates are from Let’s Encrypt using HTTP challenge, which means that to issue them on the new server, the DNS must point to the new IP first.

From what I understand:

If I change the DNS and users access the site before the new certificate is issued, they’ll see a "not secure" warning.

DNS propagation can take anywhere from minutes to hours, depending on TTL.

My current plan is:

Launch the new server with a temporary subdomain (e.g., staging.example.com).

Configure the app and test everything works properly.

Once ready, update the main DNS records to point to the new server and issue the SSL certificates for example.com and www.example.com.

Any advice or recommended workflow? Thanks.

0 likes
4 replies
Glukinho's avatar

If you already have a certificate and corresponding private key just copy them to new location and set up web server to use it. No need to obtain new certificate while the previous one is not expired. After your app is fully moved to new server, you can set up certificate renewal using certbot or somehow else.

Glukinho's avatar

Also reduce DNS TTL value to minimum (1 sec or 60 sec depending on DNS provider) before switching, it would decrease downtime. After switching you can return it back (but it's not mandatory).

JussiMannisto's avatar

@Glukinho @1k3r

After switching you can return it back (but it's not mandatory).

I want to emphasize that while it's not strictly mandatory, it's a good practice. You don't want to cause unnecessary load on the DNS.

Please or to participate in this conversation.