mirror of
https://codeberg.org/Codeberg/Documentation.git
synced 2026-08-15 14:53:29 -07:00
use example.org for pages documentation (#838)
We should consistently use a safe example domain that is [reserved by IANA](https://www.iana.org/help/example-domains) Reviewed-on: https://codeberg.org/Codeberg/Documentation/pulls/838 Reviewed-by: Robert Wolff <mahlzahn@posteo.de>
This commit is contained in:
parent
bbf5e3ab10
commit
b061608a89
1 changed files with 22 additions and 17 deletions
|
|
@ -32,18 +32,23 @@ The second record has a value of `letsencrypt.org;accounturi=https://acme-stagin
|
|||
|
||||
{% 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 %}
|
||||
|
||||
|
|
@ -60,7 +65,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>
|
||||
|
|
@ -92,12 +97,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>
|
||||
|
|
@ -126,12 +131,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>
|
||||
|
|
@ -171,12 +176,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>
|
||||
|
|
@ -194,12 +199,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>
|
||||
|
|
@ -223,11 +228,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