Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

fix(domains): register on Cloud DNS name servers because the registrar rejects bodies without a DNS provider and has deprecated Google Domains DNS

nirholasf008963d8d1c
diff --git a/api/_lib/domain-connect.js b/api/_lib/domain-connect.js
index ff21e6252..1588ec447 100644
--- a/api/_lib/domain-connect.js
+++ b/api/_lib/domain-connect.js
@@ -84,7 +84,7 @@ async function loadBalancerIp() {
return a.address;
}
-async function ensureZone(domain) {
+export async function ensureZone(domain) {
const name = zoneName(domain);
try {
return await gcp(`${DNS}/managedZones`, {
diff --git a/api/_lib/domains-service.js b/api/_lib/domains-service.js
index acd5db88f..cae33e946 100644
--- a/api/_lib/domains-service.js
+++ b/api/_lib/domains-service.js
@@ -353,12 +353,18 @@ function googleContact(c) {
};
}
-function registrationBody(domain, contact, { autoRenew, privacy }) {
+// Google Domains DNS is deprecated, so a name must register on custom name
+// servers. Validate-only quotes use the standard Cloud DNS set; a real
+// registration creates the domain's Cloud DNS zone first and uses its servers.
+const QUOTE_NAME_SERVERS = ['ns-cloud-a1.googledomains.com.', 'ns-cloud-a2.googledomains.com.', 'ns-cloud-a3.googledomains.com.', 'ns-cloud-a4.googledomains.com.'];
+
+function registrationBody(domain, contact, { autoRenew, privacy, nameServers = QUOTE_NAME_SERVERS }) {
const gc = googleContact(contact);
return {
domainName: domain,
labels: { source: 'three-ws' },
contactSettings: { privacy, registrantContact: gc, adminContact: gc, technicalContact: gc },
+ dnsSettings: { customDns: { nameServers } },
managementSettings: { preferredRenewalMethod: autoRenew ? 'AUTOMATIC_RENEWAL' : 'MANUAL_RENEWAL' },
};
}
@@ -498,6 +504,10 @@ export async function registerWithCredits({ userId, domain: input, contact, auto
}
const chosenPrivacy = pickPrivacy(s.privacy, privacy);
+ const { ensureZone } = await import('./domain-connect.js');
+ const zone = await ensureZone(domain);
+ const nameServers = zone.nameServers?.length ? zone.nameServers : QUOTE_NAME_SERVERS;
+
let row;
try {
[row] = await sql`
@@ -540,7 +550,7 @@ export async function registerWithCredits({ userId, domain: input, contact, auto
try {
const op = await metered(() =>
registerDomain({
- registration: registrationBody(domain, c, { autoRenew, privacy: chosenPrivacy }),
+ registration: registrationBody(domain, c, { autoRenew, privacy: chosenPrivacy, nameServers }),
yearlyPrice: params.yearlyPrice || numberToMoney(priceUsd, s.currency),
domainNotices: s.notices,
}),