---
title: "HTTPS by default"
description: "Replit's proxy now redirects all HTTP requests to server repls to HTTPS and serves HSTS headers, so every hosted server is HTTPS by default."
url: "https://swe.quest/articles/https-by-default-5a72c4dccd95a788"
canonical: "https://replit.com/blog/https"
source: "Replit"
published: "2021-02-26"
difficulty: "medium"
kind: "Case study"
reading_minutes: 4
tags: ["cryptography","networking","dns","load-balancing"]
---

# HTTPS by default

A post on [Replit](https://swe.quest/sources/replit.md), published 2021-02-26, 4 min read, Case study. Original: [https://replit.com/blog/https](https://replit.com/blog/https)

## Summary

Replit's proxy now redirects all HTTP requests to server repls to HTTPS and serves HSTS headers, so every hosted server is HTTPS by default. The proxy manages roughly half a million Let's Encrypt certificates via ACME. It uses HTTP-01 validation for custom domains, which already CNAME to the proxy, and DNS-01 for per-user wildcard certificates (\*.\<user\>.repl.co), so each user needs only one certificate. Certificates are renewed lazily on request once fewer than 30 days remain, about 5,000-10,000 per day. A conservation mode defers renewals when ACME rate-limit capacity runs low, and a circuit breaker forces renewal for certificates near expiry.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Cryptography](https://swe.quest/tags/cryptography.md) (Security)
- [Networking](https://swe.quest/tags/networking.md) (Infrastructure)
- [DNS](https://swe.quest/tags/dns.md) (Infrastructure)
- [Load balancing](https://swe.quest/tags/load-balancing.md) (Infrastructure)

## Prerequisites

- TLS certificates ([easy posts on Cryptography](https://swe.quest/tags/cryptography.md?difficulty=easy))
- DNS records ([easy posts on DNS](https://swe.quest/tags/dns.md?difficulty=easy))
- HTTP redirects

## Keywords

Replit, ACME, Let's Encrypt, HSTS, HTTP-01, DNS-01, wildcard certificates

## Related posts

- [Why We Built Our Own DNS Infrastructure](https://swe.quest/articles/why-we-built-our-own-dns-infrastructure-b1c8975cd0ea6aa3.md): Replit · 2021-04-29 · Medium · 4 min read · DNS, Load balancing, Distributed systems, Go
  Replit made its repl hosting cluster-aware by running its own authoritative DNS server for \*.repl.co, which resolves each repl's domain to the proxy load balancer in the cluster hosting that repl.
- [How CDNs Generate Certificates](https://swe.quest/articles/how-cdns-generate-certificates-05707ebaaeaf2273.md): Fly.io · 2020-06-25 · Medium · 10 min read · Cryptography, CDN & edge, Networking, Security
  CDNs like Fly obtain Let's Encrypt certificates for customer domains using the ACME tls-alpn-01 challenge, which needs neither DNS access nor port 80.
- [Using short-lived certificates to protect TLS secrets](https://swe.quest/articles/using-short-lived-certificates-to-protect-tls-secrets-b95eb80ecde3a8e1.md): Meta Engineering · 2023-08-07 · Medium · 7 min read · Cryptography, Security, CDN & edge, Deployment
  Meta now limits TLS private key exposure on its edge to 10 days by rotating short-lived certificates daily, after rejecting CRL/OCSP revocation (latency, failure modes), remote signing from datacenters (vulnerable to backbone and datacenter outages) and delegated credentials (insufficient browser support).
- [Welcome to the Wonderful World of Clusters](https://swe.quest/articles/welcome-to-the-wonderful-world-of-clusters-52a29e1c3fc463f3.md): Replit · 2021-03-26 · Medium · 5 min read · System design, DNS, Resilience, Distributed systems, Cloud platforms
  Replit split its infrastructure into multiple independent clusters (failure domains) after two load-related site-wide outages, moving paid Hacker users into their own cluster so future incidents affect only a subset of users.
- [That Old Certificate Expired and Started an Outage. This is What Happened Next](https://swe.quest/articles/that-old-certificate-expired-and-started-an-outage-this-is-what-happened-next-8e9755960d247908.md): Shopify Engineering · 2022-01-12 · Medium · 6 min read · Incidents & postmortems, Cryptography, Ruby, Supply chain security, Deployment
  When Let's Encrypt's old root certificate expired on September 30, 2021, Shopify's internal service-to-service HTTPS calls began failing because the Ruby httpclient gem, pulled in transitively by rack-oauth2, openid\_connect and google-api-client, ships its own six-year-old cacert.pem that trusted neither the expired root nor the new one.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
