|
|
@ -105,6 +105,9 @@ export default class Alias extends Now { |
|
|
|
console.log(`> ${chalk.bold(chalk.underline(alias))} is a custom domain.`); |
|
|
|
console.log(`> Verifying the DNS settings for ${chalk.bold(chalk.underline(alias))} (see ${chalk.underline('https://zeit.world')} for help)`); |
|
|
|
|
|
|
|
const { domain, nameservers } = await this.getNameservers(alias); |
|
|
|
if (this._debug) console.log(`> [debug] Found domain ${domain} and nameservers ${nameservers}`); |
|
|
|
|
|
|
|
try { |
|
|
|
await this.verifyOwnership(alias); |
|
|
|
} catch (err) { |
|
|
@ -113,8 +116,6 @@ export default class Alias extends Now { |
|
|
|
// in which case we attempt to correct the dns
|
|
|
|
// configuration (if we can!)
|
|
|
|
try { |
|
|
|
const { domain, nameservers } = await this.getNameservers(alias); |
|
|
|
if (this._debug) console.log(`> [debug] Found domain ${domain} and nameservers ${nameservers}`); |
|
|
|
if (isZeitWorld(nameservers)) { |
|
|
|
console.log(`> Detected ${chalk.bold(chalk.underline('zeit.world'))} nameservers! Configuring records.`); |
|
|
|
const record = alias.substr(0, alias.length - domain.length); |
|
|
@ -158,6 +159,11 @@ export default class Alias extends Now { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (!isZeitWorld(nameservers)) { |
|
|
|
if (this._debug) console.log(`> [debug] Trying to register a non-ZeitWorld domain ${domain} for the current user`); |
|
|
|
this.setupDomain(domain, { isExternal: true }); |
|
|
|
} |
|
|
|
|
|
|
|
console.log(`> Verification ${chalk.bold('OK')}!`); |
|
|
|
} |
|
|
|
|
|
|
|