Repository navigation
Add a script that adds www. to the custom domains' certificates - #123
Merged
Merged
Conversation
reissue-www.sh goes through the certificates the server reads. It reissues each one whose names lack their www. with both names, through the web root, and installs the files. A www. that does not resolve to where its domain does is left out and named, the wildcard is left alone, and the server is not restarted - the next deploy picks them up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #122, which sends
www.in front of a custom domain on to the domain. That redirect only helps once a browser trusts the server for thewww.name. A certificate issued for the domain alone does not cover it, so until it is reissued its visitors get the fallback certificate and a warning.reissue-www.shgoes through/opt/genhttp-lambda/certsand, for each certificate whose names lack theirwww.:www.resolves to where its domain does - otherwise certbot would fail for both names - and names it if not;It leaves alone the hosting domain's wildcard, domains entered with
www., and certificates that already have it. It does not restart the server: the new certificates are served from the next restart, the deploy of #122 for instance. The README's custom domain section describes it.I tried it on this machine with test certificates, a stand-in DNS lookup and a stand-in certbot. It handled each case correctly:
www.missing and resolving, resolving elsewhere, not resolving, a wildcard, and complete. The certbot command it built was right. I haven't run it against a real certbot.🤖 Generated with Claude Code