Clarify stuff about custom domains across pages docs (#819)

Reviewed-on: https://codeberg.org/Codeberg/Documentation/pulls/819
Reviewed-by: Robert Wolff <mahlzahn@posteo.de>
Reviewed-by: Catherine <whitequark@whitequark.org>
This commit is contained in:
crystal 2026-06-26 20:09:04 +02:00 committed by Robert Wolff
parent 372d3aa75e
commit 9ef2d7113b
4 changed files with 37 additions and 54 deletions

View file

@ -6,14 +6,6 @@ eleventyNavigation:
order: 100 order: 100
--- ---
{% admonition "Warning" %}
The following instructions depend on the new git-pages server for Codeberg Pages and can currently only be used on sites which are hosted under our `codeberg.page` domain, and not with sites that should be served from custom domains.
Follow the [old instructions for legacy v2 sites](/codeberg-pages/) if you would like to deploy to a custom domain.
{% endadmonition %}
Git-pages has an [associated Forgejo Action](https://codeberg.org/git-pages/action) that can be used to automatically deploy your website from a static site generation tool. Git-pages has an [associated Forgejo Action](https://codeberg.org/git-pages/action) that can be used to automatically deploy your website from a static site generation tool.
You can use any such tool you like: git-pages does not privilege any particular publishing system over others. You can use any such tool you like: git-pages does not privilege any particular publishing system over others.

View file

@ -13,7 +13,7 @@ Codeberg Pages has recently migrated from the legacy v2 codebase to the newer [g
Take note of some minor [changes and deprecations](/codeberg-pages/migrating-from-pages-v2/#breaking-changes-and-deprecations). Take note of some minor [changes and deprecations](/codeberg-pages/migrating-from-pages-v2/#breaking-changes-and-deprecations).
If you have not yet [migrated your own site to the new server,](/codeberg-pages/migrating-from-pages-v2/) we encourage you to do so. If you have not yet [migrated your own site to the new server,](/codeberg-pages/migrating-from-pages-v2/) we encourage you to do so.
We do not currently have any concrete plans to disable Pages Server v2. Pages Server v2 has already been disabled for new users due to abuse, however it is still working for users and organizations that already existed prior to the service being discontinued. We apologize for any inconvenience this has caused.
The new documentation is work in progress, and we appreciate your feedback. Please let us know in case you find yourself confused. The new documentation is work in progress, and we appreciate your feedback. Please let us know in case you find yourself confused.
@ -85,20 +85,7 @@ This page documents the first method. See the [separate page on using Forgejo Ac
## Getting started with a custom domain ## Getting started with a custom domain
{% admonition "warning" %} You can now deploy custom domains using git-pages! Please see the [documentation page about using custom domains](/codeberg-pages/using-custom-domain/) for details.
You can only use the legacy v2 Pages deployment method at the moment if you want to serve your site with a custom domain.
Websites deployed this way will keep working indefinitely.
You will be able to seamlessly migrate to the new version of Pages once it is supported.
{% endadmonition %}
There are two steps to getting started with a custom domain: configuration on Codebergs side, and configuration on the side of your DNS.
To set up your website for publication on a custom domain on the Codeberg side, simply upload your content to a branch of a repository called `pages`. You then also need to create a plain text file called `.domains` listing the domains your website should be available at.
You then need to set up DNS records to point to Codeberg. Instructions on how to do this are available on the [documentation page about using custom domains](/codeberg-pages/using-custom-domain/).
## Having problems? ## Having problems?

View file

@ -10,17 +10,18 @@ eleventyNavigation:
Codeberg Pages is currently migrating from the legacy v2 codebase to the newer [git-pages](https://git-pages.org/) codebase. Codeberg Pages is currently migrating from the legacy v2 codebase to the newer [git-pages](https://git-pages.org/) codebase.
Currently, websites that use custom domains can only be deployed using the old method, but we are working to fix this.
Such websites will keep working indefinitely.
You will be able to seamlessly migrate to the new version of Pages once it is supported.
Take note of some minor [changes and deprecations](/codeberg-pages/migrating-from-pages-v2/#breaking-changes-and-deprecations). Take note of some minor [changes and deprecations](/codeberg-pages/migrating-from-pages-v2/#breaking-changes-and-deprecations).
Websites hosted under the `codeberg.page` domain can already use the new git-pages method.
The new documentation is work in progress, and we appreciate your feedback. Please let us know in case you find yourself confused. The new documentation is work in progress, and we appreciate your feedback. Please let us know in case you find yourself confused.
{% endadmonition %} {% endadmonition %}
{% admonition "info" "Notice" %}
Custom domains are now supported by the new git-pages server! Please refer to [the updated custom domain setup guide](/codeberg-pages/using-custom-domain/) for details on how to properly replace your old DNS records before proceeding.
{% endadmonition %}
Since December 2025, Codeberg offers a new Pages service based on [git-pages](https://codeberg.org/git-pages/git-pages). Since December 2025, Codeberg offers a new Pages service based on [git-pages](https://codeberg.org/git-pages/git-pages).
It improves performance and stability, and fixes various design issues from the current [Pages Server v2](https://codeberg.org/Codeberg/pages-server). Unfortunately, these fixed design issues require some migration and deprecation of features. It improves performance and stability, and fixes various design issues from the current [Pages Server v2](https://codeberg.org/Codeberg/pages-server). Unfortunately, these fixed design issues require some migration and deprecation of features.

View file

@ -13,22 +13,7 @@ Codeberg Pages has recently migrated from the legacy v2 codebase to the newer [g
Take note of some minor [changes and deprecations](/codeberg-pages/migrating-from-pages-v2/#breaking-changes-and-deprecations). Take note of some minor [changes and deprecations](/codeberg-pages/migrating-from-pages-v2/#breaking-changes-and-deprecations).
If you have not yet [migrated your own site to the new server,](/codeberg-pages/migrating-from-pages-v2/) we encourage you to do so. If you have not yet [migrated your own site to the new server,](/codeberg-pages/migrating-from-pages-v2/) we encourage you to do so.
We do not currently have any concrete plans to disable Pages Server v2. Pages Server v2 has already been disabled for new users due to abuse, however it is still working for users and organizations that already existed prior to the service being discontinued. We apologize for any inconvenience this has caused.
The new documentation is work in progress, and we appreciate your feedback. Please let us know in case you find yourself confused.
{% endadmonition %}
{% admonition "Warning" %}
Codeberg Pages is currently migrating from the legacy v2 codebase to the newer [git-pages](https://git-pages.org/) codebase.
Currently, websites that use custom domains can only be deployed using the old method, but we are working to fix this.
Such websites will keep working indefinitely.
You will be able to seamlessly migrate to the new version of Pages once it is supported.
Take note of some minor [changes and deprecations](/codeberg-pages/migrating-from-pages-v2/#breaking-changes-and-deprecations).
Websites hosted under the `codeberg.page` domain can already use the new git-pages method.
The new documentation is work in progress, and we appreciate your feedback. Please let us know in case you find yourself confused. The new documentation is work in progress, and we appreciate your feedback. Please let us know in case you find yourself confused.
@ -75,11 +60,6 @@ In the end, it should look like this:
<th>Data</th> <th>Data</th>
</thead> </thead>
<tbody> <tbody>
<tr>
<td>yourdomain.com</td>
<td>CNAME</td>
<td>codeberg.page.</td>
</tr>
<tr> <tr>
<td>www.yourdomain.com</td> <td>www.yourdomain.com</td>
<td>CNAME</td> <td>CNAME</td>
@ -90,15 +70,22 @@ In the end, it should look like this:
{% admonition "Warning" %} {% admonition "Warning" %}
With a CNAME record everything on this domain is delegated to `codeberg.page`, which means you cannot setup your own The `codeberg.page` zone is not currently DNSSEC signed, which may cause unexpected behavior with your domain if your domain's zone is signed and a client is using a DNSSEC validating resolver.
email address with this method.
If you need email or others services, you have to use one of the remaining options. If you have DNSSEC enabled, you should use A/AAAA records for now.
{% endadmonition %} {% endadmonition %}
If you have an apex domain you will not be able to use a CNAME record. {% admonition "Warning" %}
In this case, many DNS providers support an ALIAS record which will work instead.
With a CNAME record, everything on this subdomain is delegated to `codeberg.page`, which means you cannot setup other types of DNS records for other services on the same subdomain.
If you need to setup other records for other services, such as MX records for email, on the same subdomain, you must use one of the remaining options.
{% endadmonition %}
If the domain you wish to use is the apex of the zone or has other existing DNS records, you will not be able to use a CNAME record.
In this case, some DNS providers support an ALIAS record, which will work instead. Some DNS providers (such as Cloudflare) only allow setting "flattened" CNAME records at the apex, which works the same way as an ALIAS record.
<table class="table"> <table class="table">
<thead> <thead>
@ -120,6 +107,14 @@ In this case, many DNS providers support an ALIAS record which will work instead
</tbody> </tbody>
</table> </table>
{% admonition "Warning" %}
This type of record is not supported in conjunction with DNSSEC signed zones, which may cause unexpected behavior with your domain if your domain's zone is signed and a client is using a DNSSEC validating resolver.
If you have DNSSEC enabled, you should use A/AAAA records for now.
{% endadmonition %}
If you cannot use a CNAME nor an ALIAS record, If you cannot use a CNAME nor an ALIAS record,
you will need to set up the A and AAAA records to point to Codebergs IP addresses directly. you will need to set up the A and AAAA records to point to Codebergs IP addresses directly.
@ -160,6 +155,14 @@ The DNS records in turn ensure that the domain owner authorizes that repository
{% endadmonition %} {% endadmonition %}
{% admonition "info" "Notice" %}
Since the new git-pages server uses these DNS records as an authorization method, it is no longer necessary to have a `.domains` file in your repository. You may remove it if you are migrating your website from the old Pages Server v2.
If you were relying on the old server's multi-domain redirection implementation, it may still be used if you only deploy your site to one of your domains on git-pages. See [the last section of this document](/codeberg-pages/migrating-from-pages-v2/#deploying-to-versions-of-your-domain-both-with-and-without-www.) for detailed instructions on setting up similar redirects on git-pages.
{% endadmonition %}
**If you deploy from a webhook,** **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. set a TXT record on the `_git-pages-repository` subdomain of your domain with the HTTPS Git clone URL for your repository.