mirror of
https://codeberg.org/Codeberg/Documentation.git
synced 2026-08-15 14:53:29 -07:00
use example.org for pages documentation
We should use a safe and stable example domain that is [reserved by IANA](https://www.iana.org/help/example-domains)
This commit is contained in:
parent
f350065a74
commit
29e51ef61a
1 changed files with 22 additions and 17 deletions
|
|
@ -35,18 +35,23 @@ In this case you must add `A` / `AAAA` / `TXT` records for all domains instead o
|
|||
|
||||
{% endadmonition %}
|
||||
|
||||
_We assume for the following description, that you want to serve your website with and without www in front.
|
||||
If you are on a subdomain already (like myproject.yourdomain.com), you can skip the `www.yourdomain.com` CNAME entry._
|
||||
{% admonition "info" "Notice" %}
|
||||
|
||||
Throughout this document, the domain `example.org` is used as a placeholder for your own domain. Please ensure you replace any literal instances of `example.org` with the domain that you've purchased to ensure the proper setup procedure.
|
||||
|
||||
We provide context-appropriate examples for both the apex domain, and the `www` subdomain commonly used for websites. If you wish to use a different subdomain, replace the `www` in the following examples with the hostname of your desired subdomain. If you wish to use the apex domain (that is, the bare domain without any `www.` in front), we recommend additionally setting up a redirect on the `www` subdomain (or vice versa) to ensure compatibility with all browsers and devices.
|
||||
|
||||
{% endadmonition %}
|
||||
|
||||
{% admonition "Warning" %}
|
||||
|
||||
When setting up DNS records with many registrars, any domain added to the `Domain` or `Host` option is automatically
|
||||
When setting up DNS records with many providers, any domain added to the `Domain` or `Host` option is automatically
|
||||
appended onto the domain the records are being made for.
|
||||
|
||||
For example, if your domain is `example.com`, entering `www` will mean the record refers to `www.example.com`.
|
||||
For example, if your domain is `example.org`, entering `www` will mean the record refers to `www.example.org`.
|
||||
|
||||
Therefore, in this guide, you may need to replace references to just your domain name (e.g. `example.com`) with `@` and
|
||||
`anything.example.com` (i.e. any subdomain) with just `anything`.
|
||||
Therefore, in this guide, you may need to replace references to just your domain name (e.g. `example.org`) with `@` and
|
||||
`anything.example.org` (i.e. any subdomain) with just `anything`, depending on your DNS provider.
|
||||
|
||||
{% endadmonition %}
|
||||
|
||||
|
|
@ -63,7 +68,7 @@ In the end, it should look like this:
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>www.yourdomain.com</td>
|
||||
<td>www.example.org</td>
|
||||
<td>CNAME</td>
|
||||
<td>codeberg.page.</td>
|
||||
</tr>
|
||||
|
|
@ -95,12 +100,12 @@ In this case, some DNS providers support an ALIAS record, which will work instea
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>yourdomain.com</td>
|
||||
<td>example.org</td>
|
||||
<td>ALIAS</td>
|
||||
<td>codeberg.page</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>www.yourdomain.com</td>
|
||||
<td>www.example.org</td>
|
||||
<td>ALIAS</td>
|
||||
<td>codeberg.page</td>
|
||||
</tr>
|
||||
|
|
@ -129,12 +134,12 @@ so keep an eye on Codeberg updates to check.
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>yourdomain.com</td>
|
||||
<td>example.org</td>
|
||||
<td>A</td>
|
||||
<td>217.197.84.141</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>yourdomain.com</td>
|
||||
<td>example.org</td>
|
||||
<td>AAAA</td>
|
||||
<td>2a0a:4580:103f:c0de::2</td>
|
||||
</tr>
|
||||
|
|
@ -174,12 +179,12 @@ set a TXT record on the `_git-pages-repository` subdomain of your domain with th
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>_git-pages-repository.yourdomain.com</td>
|
||||
<td>_git-pages-repository.example.org</td>
|
||||
<td>TXT</td>
|
||||
<td>https://codeberg.org/username/repository.git</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>_git-pages-repository.www.yourdomain.com</td>
|
||||
<td>_git-pages-repository.www.example.org</td>
|
||||
<td>TXT</td>
|
||||
<td>https://codeberg.org/username/repository.git</td>
|
||||
</tr>
|
||||
|
|
@ -197,12 +202,12 @@ set a TXT record on the `_git-pages-forge-allowlist` subdomain of your domain wi
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>_git-pages-forge-allowlist.yourdomain.com</td>
|
||||
<td>_git-pages-forge-allowlist.example.org</td>
|
||||
<td>TXT</td>
|
||||
<td>https://codeberg.org/username/repository.git</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>_git-pages-forge-allowlist.www.yourdomain.com</td>
|
||||
<td>_git-pages-forge-allowlist.www.example.org</td>
|
||||
<td>TXT</td>
|
||||
<td>https://codeberg.org/username/repository.git</td>
|
||||
</tr>
|
||||
|
|
@ -226,11 +231,11 @@ you should choose one of them to be the ‘canonical’ URL,
|
|||
add a [`_redirects` file](/codeberg-pages/advanced-usage/) to your site redirecting from one version to the other,
|
||||
and deploy your website to both domains. (I.e. set up two separate webhooks, or use two separate deploy actions.)
|
||||
|
||||
For example, to redirect people from www.yourdomain.com to yourdomain.com,
|
||||
For example, to redirect people from www.example.org to example.org,
|
||||
use this `_redirects` file:
|
||||
|
||||
```
|
||||
//www.yourdomain.com/* https://yourdomain.com/:splat 302!
|
||||
//www.example.org/* https://example.org/:splat 302!
|
||||
```
|
||||
|
||||
For the redirect to work,
|
||||
|
|
|
|||
Loading…
Reference in a new issue