This section is a work in progress.
Our setup on Cloudflare supports the follow record types: (octoDNS docs)
A, AAAA, ALIAS, CAA, CNAME, MX, NS, PTR, SPF, SRV, TXT
You'll mostly wish to use these common types:
A
: most common and basic (ipv4)AAAA
: same asA
, but for ipv6CNAME
: domain name aliases. only works on subdomains. often used in custom domains for hosted services like GitHub Pages, Heroku, etc.ALIAS
: similar toCNAME
, but works only on root domainMX
: used to setting up email addressesTXT
: holds arbitrary text data
Both A
and CNAME
records can be proxied with Cloudflare, if specified as below. (Cloudflare docs)
See the examples below to support in managing records.
(Note that either value
or values
can be used as key, but the latter expects an array.)
Adding an MX record to existing [sub]domain
diff --git a/g0v.ca./g0v.ca.yaml b/g0v.ca./g0v.ca.yaml
index 3050a90..474481e 100644
--- a/g0v.ca./g0v.ca.yaml
+++ b/g0v.ca./g0v.ca.yaml
@@ -15,3 +15,7 @@
- 301 https://g0v.tw/
- type: ALIAS
value: 301.ronny.tw.
+ - type: MX
+ values:
+ - exchange: mx.example.com.
+ preference: 10
Add one more TXT record
diff --git a/g0v.ca./g0v.ca.yaml b/g0v.ca./g0v.ca.yaml
index 3050a90..2a62d42 100644
--- a/g0v.ca./g0v.ca.yaml
+++ b/g0v.ca./g0v.ca.yaml
@@ -6,6 +6,7 @@
- admin=patcon
# Used for 301 redirect service below
- 301 https://g0v.tw/
+ - google-site-verification=1234-abcd-5678-EFGH
- type: ALIAS
value: 301.ronny.tw.
Create mysubdomain.g0v.ca
with redirect to example.com
diff --git a/config.yaml b/config.yaml
index 3d10aed..4947530 100644
--- a/config.yaml
+++ b/config.yaml
@@ -21,6 +21,8 @@ zones:
targets:
- cloudflare
g0v.ca.:
+ # Allow TXT and CNAME to be created on same subdomain.
+ lenient: true
sources:
- config-files
targets:
diff --git a/g0v.ca./mysubdomain.g0v.ca.yaml b/g0v.ca./mysubdomain.g0v.ca.yaml
new file mode 100644
index 0000000..7536024
--- /dev/null
+++ b/g0v.ca./mysubdomain.g0v.ca.yaml
@@ -0,0 +1,8 @@
+---
+mysubdomain:
+ - type: TXT
+ values:
+ # Used for 301 redirect service below
+ - 301 https://example.com/
+ - type: CNAME
+ value: 301.ronny.tw.
Create mysubdomain.g0v.ca
and point to IP
diff --git a/g0v.ca./mysubdomain.g0v.ca.yaml b/g0v.ca./mysubdomain.g0v.ca.yaml
new file mode 100644
index 0000000..d079979
--- /dev/null
+++ b/g0v.ca./mysubdomain.g0v.ca.yaml
@@ -0,0 +1,11 @@
+---
+mysubdomain:
+ - type: A
+ octodns:
+ cloudflare:
+ proxied: true
+ value: 123.45.67.89
+ metdata:
+ repository: https://github.com/your-user/your-repo
+ maintainer:
+ - some-username
Delete subdomain oldapp.g0v.network
diff --git a/g0v.network./oldapp.g0v.network.yaml b/g0v.network./oldapp.g0v.network.yaml
deleted file mode 100644
index ed900a2..0000000
--- a/g0v.network./oldapp.g0v.network.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-oldapp:
- type: CNAME
- value: my-old-app.netlify.com.
- metadata:
- repo: https://github.com/g0v-network/my-old-app
- maintainer:
- - some-username
To add a new subdomain, just add an A
or CNAME
record as above, but for a
new subdomain using a new config file.
- #todo describe forwardemail service
- https://forwardemail.net/en/faq#table-dns-management-by-registrar
- really just adding a specific type of DNS Record (see above)
- example: adding a new email to existing subdomain
- for new subdomain, see above
#todo
If you'd like to start managing a new domain through this repo, you can do that! You'll only need to point your registrar at our Cloudflare nameservers -- you keep the domain with your registrar, and the domain itself stays in your hands.
- Create a new domain directory and config (see below)
- Copy your existing records into appropriate yaml config.
- Submit a pull request.
- We'll create a new zone for your domain in the Cloudflare admin interface.
- We'll add that zone to our existing Cloudflare API token, so it can be managed by our automation.
- We'll merge the pull request after review
- Cloudflare's nameserver will be updated on merge, but your registrar won't be pointed to it yet.
- After merging, point your registrar at our Cloudflare nameservers:
clyde.ns.cloudflare.com tina.ns.cloudflare.com
- Confirm that your DNS records work as expected, using:
- DNS Nameserver Checker: https://mxtoolbox.com/SuperTool.aspx?action=dns:g0v.ca&run=toolpage
Adding example.com
as newly managed domain
diff --git a/README.md b/README.md
index b079994..8266139 100644
--- a/README.md
+++ b/README.md
@@ -7,6 +7,7 @@ The following damains can be managed here:
- `g0v.ca`
- `c4nada.ca`
- `t0ronto.ca`
+- `example.com`
Changing or adding DNS records in `main` branch of this repository will update
the actual domain records.
diff --git a/config.yaml b/config.yaml
index 3d10aed..c23c490 100644
--- a/config.yaml
+++ b/config.yaml
@@ -35,3 +35,8 @@ zones:
- config-files
targets:
- cloudflare
+ example.com.:
+ sources:
+ - config-files
+ targets:
+ - cloudflare
diff --git a/example.com./example.com.yaml b/example.com./example.com.yaml
new file mode 100644
index 0000000..acedadd
--- /dev/null
+++ b/example.com./example.com.yaml
@@ -0,0 +1,6 @@
+---
+'':
+ - type: TXT
+ values:
+ # Who has admin for this domain
+ - admin=<some identifier of person who owns it>