Amplify Toolbox
    Preparing search index...

    Type Alias HostingDomainConfig

    Domain configuration for custom domain support. Supports multiple domains and optional www redirect.

    type HostingDomainConfig = {
        certificate?: ICertificate;
        domainName: string | string[];
        hostedZone?: string;
        hostedZoneId?: string;
        wwwRedirect?: "toApex" | "toWww" | "none";
    }
    Index

    Properties

    certificate?: ICertificate

    BYO certificate — avoids deprecated DnsValidatedCertificate when provided.

    domainName: string | string[]

    Domain name(s) for the hosting distribution. Accepts a single domain or an array for multi-domain setups.

    hostedZone?: string

    Route 53 hosted zone domain name. When omitted (along with hostedZoneId), DNS records are not created — user manages DNS externally.

    hostedZoneId?: string

    Route 53 hosted zone ID. Avoids HostedZone.fromLookup() which requires env: { account, region } on the stack. Useful in pipeline stages.

    wwwRedirect?: "toApex" | "toWww" | "none"

    Redirect www to apex (or vice versa) via a CloudFront Function.

    'none'