From 9d315f81c670a19f15b580b75b9a7d52bad65b14 Mon Sep 17 00:00:00 2001 From: Emi Griffith Date: Fri, 10 Jul 2026 20:40:08 -0700 Subject: [PATCH] Caddyfile: redirect old raw-IP URLs to the canonical domain (#16) Requests to http:///... were bounced by the default HTTP->HTTPS rule to https on the bare IP, which has no certificate and fails the TLS handshake, so pre-domain bookmarks dead-ended with a blank page. Add an http:// site block that 301-redirects to https://emigriffith.dev, preserving the path. --- deploy/Caddyfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/deploy/Caddyfile b/deploy/Caddyfile index 5e6c0c9..1cba80a 100644 --- a/deploy/Caddyfile +++ b/deploy/Caddyfile @@ -35,6 +35,12 @@ emigriffith.dev { } } +# Old bookmarks to the raw IP (the pre-domain URL) would otherwise get bounced to +# HTTPS-on-the-IP, which has no cert and fails. Redirect them to the real domain. +http://75.119.132.91 { + redir https://emigriffith.dev{uri} permanent +} + # Optional: redirect www -> apex. Add a www CNAME/A record first, then uncomment. # www.emigriffith.dev { # redir https://emigriffith.dev{uri} permanent