@tryghost/dns
v0.8.9
Published
Lookup DNS info for a domain. The package powers Ghost(Pro) custom-domain checks by collecting DNS records, Cloudflare/Fastly-related metadata, and validity ratings for CNAME and SSL configuration.
Maintainers
Keywords
Readme
DNS
Lookup DNS info for a domain. The package powers Ghost(Pro) custom-domain checks by collecting DNS records, Cloudflare/Fastly-related metadata, and validity ratings for CNAME and SSL configuration.
Usage: pnpm --filter @tryghost/dns dns -- <blog.ghost.org>
Outputs:
{
"hostname": "blog.ghost.org",
"domain": "ghost.org",
"subdomain": "blog",
"records": {
"A": [{ "value": "104.16.127.190", "cf": true }, {}],
"CNAME": [],
"NS": ["sara.ns.cloudflare.com.", "woz.ns.cloudflare.com."]
},
"whois": "Cloudflare",
"cloudflare": true,
"valid": {
"cname": "maybe",
"ssl": "C"
}
}Installation
- Make sure that
gstenvis green. See Dev Environment for docs. git clonethis repo &cdinto it as usual- Run
pnpm installto install top-level dependencies.
Run
- Run:
pnpm --filter @tryghost/dns dns -- <url> - Aliased as
pnpm --filter @tryghost/dns dev -- <url>for consistency - Doesn't matter which you run!
You can also use it from Node:
const dns = require('@tryghost/dns');
const result = await dns('blog.ghost.org');
console.log(result.records);Test
pnpm --filter @tryghost/dns lintruns lintpnpm --filter @tryghost/dns testruns lint and tests
Publish
- Use the top-level publish instructions.
Copyright & License
Copyright (c) 2013-2026 Ghost Foundation - Released under the MIT license. Ghost and the Ghost Logo are trademarks of Ghost Foundation Ltd. Please see our trademark policy for info on acceptable usage.
