How to force HTTPS

Redirect all HTTP traffic to HTTPS for your application on TurboStack.

On TurboStack you do not need to write a redirect to force HTTPS - it is handled for you. Once a application has an active certificate, the platform serves it over HTTPS and redirects HTTP to HTTPS automatically.

Make sure HTTPS is active

Give the application a certificate by setting cert_type: letsencrypt (the default for most applications) and publishing - see TLS certificates. Once the certificate is issued, HTTP requests are redirected to HTTPS.

Point your application at HTTPS

So your app generates https:// links and avoids mixed-content warnings, set its site or base URL to the https:// address (for example the WordPress Site Address, or the framework's APP_URL).

Optional: enforce HTTPS in the browser with HSTS

To tell browsers to always use HTTPS for your domain, add the Strict-Transport-Security header - see Add custom HTTP headers:

add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;

Verify

An HTTP request should answer with a 301 redirect to the https:// URL:

curl -I http://example.com