Skip to content

RegionalHostname

Source: src/Cloudflare/RegionalHostname/RegionalHostname.ts

A Regional Hostname restricts which Cloudflare data centers decrypt and service HTTPS traffic for a hostname (Data Localization Suite / Regional Services).

A DNS record for the hostname must exist in the zone for regionalization to take effect (soft dependency on Cloudflare.DNS.Record). Only regionKey is mutable; hostname is the path identifier and routing is create-only, so both force a replacement.

Requires the Data Localization Suite (or Enterprise) entitlement on the zone.

Pin a hostname to the EU

const regional = yield* Cloudflare.RegionalHostname.RegionalHostname("eu-only", {
zoneId: zone.zoneId,
hostname: "app.example.com",
regionKey: "eu",
});

Move it to the US in place

const regional = yield* Cloudflare.RegionalHostname.RegionalHostname("eu-only", {
zoneId: zone.zoneId,
hostname: "app.example.com",
regionKey: "us",
});