diff --git a/content/codeberg-pages/using-custom-domain.md b/content/codeberg-pages/using-custom-domain.md index 0560078..4082677 100644 --- a/content/codeberg-pages/using-custom-domain.md +++ b/content/codeberg-pages/using-custom-domain.md @@ -30,6 +30,8 @@ This means you need to add two extra CAA records. The first record has a value of `letsencrypt.org;accounturi=https://acme-v02.api.letsencrypt.org/acme/acct/292520050;validationmethods=tls-alpn-01,http-01`. The second record has a value of `letsencrypt.org;accounturi=https://acme-staging-v02.api.letsencrypt.org/acme/acct/272029763;validationmethods=tls-alpn-01,http-01`. +This won’t work for providers like Namecheap that restrict CAA records. For Namecheap, one CAA with value of `letsencrypt.org` should be sufficient. + {% endadmonition %} {% admonition "info" "Notice" %} @@ -167,6 +169,7 @@ If you were relying on the old server's multi-domain redirection implementation, **If you deploy from a webhook,** set a TXT record on the `_git-pages-repository` subdomain of your domain with the HTTPS Git clone URL for your repository. +Here are examples: @@ -183,7 +186,12 @@ set a TXT record on the `_git-pages-repository` subdomain of your domain with th - + + + + + +
_git-pages-repository.www.example.org TXThttps://codeberg.org/username/repository.githttps://codeberg.org/username/repository.git (might be different from the toplevel domain)
_git-pages-repository.sub.example.orgTXThttps://codeberg.org/username/another-repository.git (another subdomain for another project, might be different from the toplevel domain)
@@ -214,9 +222,18 @@ set a TXT record on the `_git-pages-forge-allowlist` subdomain of your domain wi ### Step 3: Set your webhook or Forgejo Actions deploy target **If you deploy from a webhook,** -the webhook **Target URL** should be set to the domain you want to deploy your website to. +the webhook **Target URL** should be set to the (sub)domain you want to deploy your website to. For technical reasons, the first deployment needs to go over HTTP and you need to specify the `http://` scheme. After the first successful deployment you can change it to the `https://` scheme. +So, for toplevel domain, the link should be e.g. `http://example.org`, while for subdomain it should be `http://sub.example.org`. + +{% admonition "Warning" %} + +Mixing these up might result in your toplevel website being overwritten with project page. +So if you want to deploy to a subdomain, list it as hook target directly. + +{% endadmonition %} + **If you deploy from Forgejo Actions,** the `site` parameter to the git-pages action should be set to the URL of your custom domain, and the `server` parameter should be set to `codeberg.page`. The [Forgejo Actions guide](/codeberg-pages/forgejo-actions/) includes example workflows and more information.