Skip to content
Pinner.xyz

Manage Websites

List your websites, update their content, and delete sites you no longer need.

List websites

pinner websites list

Get a single website

const site = await pinner.websites.getWebsite(42);
console.log(site.domain, site.status, site.target_hash);

Update a website

Point your domain at new content after a rebuild:

# Deploy new content and update the website record
pinner websites update <domain> --cid <new-cid>

The updateWebsite method accepts a WebsiteRequest object with domain, target_type, and target_hash. All fields are sent in the request; omit a field to leave it unchanged, or set it to update. To enable DNS hosting, include dns_hosting_enabled:

const updated = await pinner.websites.updateWebsite(42, {
  domain: "newdomain.example.com",
  target_type: "ipfs",
  target_hash: "QmNewCID",
  dns_hosting_enabled: true,
});

Delete a website

pinner websites delete <domain>

Validate domain ownership

If your custom domain hasn't been validated yet, trigger a validation check:

const result = await pinner.websites.validateWebsite(42);
console.log(result.valid, result.reason, result.message);

Validation reasons:

ReasonMeaning
validatedDomain ownership confirmed
token_expiredValidation token has expired, redeploy
dns_missingThe TXT record wasn't found
dns_mismatchTXT record exists but token doesn't match
token_missingNo validation token on the website record

Website properties

Every website has these fields:

FieldDescription
idUnique identifier
domainThe domain name for the website
target_typeContent address type (ipfs or ipns)
target_hashThe CID or IPNS name the domain points to
statusCurrent website status (see below)
active_cidThe currently-published content CID (present for IPNS targets)
validation_tokenToken for proving domain ownership
validation_record_hostDNS hostname for the TXT record (e.g. pinner-verify.example.com)
validation_expires_atWhen the validation token expires
dns_hosting_enabledWhether Pinner manages DNS for this domain
dns_zone_idID of the DNS zone hosting this website's records (when DNS hosting enabled)
ipns_key_idID of the linked IPNS key (set when DNS hosting auto-creates a key)
is_subdomainWhether this is a subdomain of a shared DNS zone
gateway_domainGateway domain for constructing public URLs
last_checked_atWhen the website was last checked by the janitor
sslSSL certificate status (see SSL)
expiredWhether the validation token has expired
created / updatedTimestamps

Website statuses

A website can be in one of four statuses:

StatusDescription
pending_validationAwaiting domain ownership validation (initial status after creation)
activeDomain validated and website is live
brokenTarget content is unreachable
blockedWebsite has been blocked by an administrator