Skip to content
ShipCheck
Guides

How to force HTTP to HTTPS on a Lovable, Bolt, Vercel or Netlify custom domain

Updated 21 November 2026

A site can look fine when you type https:// yourself and still serve the same page over plain http://. Anyone who follows an old link, or whose browser hasn't seen your HSTS header yet, can land on the unencrypted address. Logins and form data then travel in the clear. The fix is a server redirect: a request to http://your-app.com should come back as a 301 or 308 (or another 3xx) with a Location that starts with https://. HSTS is useful later, but it is not a substitute for that first redirect.

Check your own app for this, free.

Paste your live URL. ShipCheck looks for leaked API keys in your page and JavaScript, exposed files like /.env and /.git, missing security headers, SSL certificate problems, domain expiry (custom domains only) and what Google sees without running JavaScript. You'll see your score without signing up.

See an example report

Short answer

Check with curl -sI http://your-app.com (no -L, so you see the first response). You want a redirect to https://, not a 200 of the page over HTTP. On Vercel the CDN always forwards HTTP to HTTPS with a 308; there is no switch to turn this off. On Lovable the redirect is always on for every project address, including lovable.app and your custom domain; there is no force-HTTPS setting. On Netlify, once HTTPS is enabled, force SSL on the site (Domain management → HTTPS, or the site's force_ssl setting). On Bolt, the site is served over HTTPS once the certificate is issued; check the redirect with curl, and fix the certificate first if the domain is not yet Secure.

How to check

curl -sI http://your-app.com | grep -iE '^(HTTP|location)'
  • Good: a status in the 300s and a Location: https://… line. 301 and 308 are the usual permanent redirects; 302 or 307 still send people to HTTPS.
  • A problem: a 200 (the page over HTTP), a redirect that still starts with http://, or no Location at all.

Do not add -L on this first check: curl would follow the redirect and you would only see the final HTTPS page, which can hide a missing redirect. Test the hostname your visitors use (the custom domain, not only the preview URL). If the certificate itself is missing or expired, fix that first: SSL certificate and domain expiry.

What the hosts actually do

  • Vercel (v0, Cursor, or a Lovable/Bolt export). The CDN automatically forwards every HTTP request to HTTPS with a 308 Permanent Redirect. This can't be disabled. You do not add a rule in vercel.json for it. Docs: Encryption and TLS. If Cloudflare sits in front and you see a redirect loop, Cloudflare's Flexible SSL mode is a common cause: the browser talks HTTPS to Cloudflare, Cloudflare talks HTTP to Vercel, and Vercel redirects back to HTTPS. Use Full (strict). Docs: Reverse Proxy Servers and Vercel.
  • Lovable. On every address of the project, including the lovable.app URL and a connected custom domain, Lovable redirects plain http:// requests to https://. There is no setting to force HTTPS, because the redirect is always active. The address that serves the site (the primary domain, or each connected domain if none is primary) uses a 301; other connected addresses, such as www or the lovable.app URL, send HTTP requests to the HTTPS primary domain with a temporary redirect. Docs: How Lovable hosts your app and Set up a custom domain. If an audit tool reports a 500 on the HTTP address with no Location, Lovable says that can come from the tool, not the domain; check with curl or a phone on mobile data instead.
  • Netlify (including Bolt apps published to Netlify). Netlify provisions HTTPS automatically for the netlify.app URL and for a custom domain once DNS points at Netlify. Check the certificate under Domain management → HTTPS. Once SSL is enabled, turn on force SSL for the site (force_ssl) so HTTP is not left serving the page. If force SSL is off, HTTP and HTTPS need separate redirect rules; you can also add an explicit rule in _redirects such as http://your-app.com/* https://your-app.com/:splat 301!. Docs: HTTPS (SSL) and Redirect options.
  • Bolt hosting. Bolt automatically provides SSL for connected domains and serves the site over HTTPS once the certificate is issued. Its docs do not describe a separate force-HTTPS toggle. Check the redirect with the curl command above. If the domain status is not yet Secure, fix DNS and issue the certificate first (Domains & Hosting, then Ensure SSL certificate if needed). Docs: Domain status, HTTPS, and SSL certificates.

HSTS (Strict-Transport-Security) tells browsers that have already visited over HTTPS to keep using it. It does not create the first redirect. How to set that header: security headers for Lovable, Bolt, Vercel and Netlify.

Checklist

  1. curl -sI http://your-app.com (no -L) returns a 3xx with Location: https://….
  2. The same check works for www if you use that hostname.
  3. The certificate on the HTTPS URL is trusted and not expired.
  4. If a CDN or Cloudflare is in front, it talks to the origin over HTTPS (not Flexible SSL), so you don't get a redirect loop.

This is one item on a short pre-launch pass. For the rest, see the vibe-coded app security checklist.

What ShipCheck checks (and what it doesn't)

When the URL you scan is already https://, the free scan requests http:// on the same hostname, without following redirects. It passes when the response is a 3xx status with a Location that starts with https:// (301, 308 and other 3xx all count). It fails when the HTTP URL returns something else, such as a 200 of the page. If that HTTP request itself errors or times out, the check is skipped, not failed. This is separate from the SSL certificate check and from whether an HSTS header is present. The scan does not change DNS or host settings, does not probe Storage buckets, and does not detect Next.js versions. The Supabase table-read test needs a free account that has verified it owns the app; the anonymous scan does not query tables. Paid plans re-scan weekly on Solo ($12/mo) or daily on Builder ($29/mo), which includes this redirect check again. Separately, paid plans also check once a day that the app URL returns a status below 400 (a 15 second timeout, with an email after two failed checks). That daily check is not a substitute for this redirect test: if you only monitor the https:// URL, a missing HTTP redirect will not show up as downtime.

FAQ

How do I check if my site redirects HTTP to HTTPS?

Run curl -sI http://your-app.com (without -L) and look at the first response. A 301 or 308 (or another 3xx) with Location starting with https:// is a pass. A 200 over HTTP is a fail. ShipCheck's free scan does this check when the URL you enter is already https://.

Does Lovable redirect HTTP to HTTPS on a custom domain?

Yes. Lovable says the redirect is always active on every project address, including lovable.app and a connected custom domain, and that there is no force-HTTPS setting. The address that serves the site uses a 301; other connected addresses send HTTP to the HTTPS primary domain with a temporary redirect.

Do I need to add a vercel.json rule to force HTTPS on Vercel?

No. Vercel's CDN automatically forwards HTTP to HTTPS with a 308, and that behaviour can't be disabled. A vercel.json redirect is for other URL changes, not for this.

Is an HSTS header enough instead of an HTTP redirect?

No. HSTS only helps browsers that have already visited over HTTPS (or that ship with your domain on the preload list). The first visit, and any client that ignores HSTS, still needs the server to redirect http:// to https://.

Does ShipCheck check the HTTP to HTTPS redirect?

Yes. The free scan requests http:// on the same hostname, without following redirects, and passes when the response is a 3xx with a Location that starts with https://. It skips the check if that HTTP request fails, and it only runs this check when the scanned URL is already https://. It does not treat a missing redirect as downtime.

Run the same checks on your app.

A free scan takes under a minute. No card, and no sign-up to see your score and the list of issues.

See an example report