Parameter hostRequired explained

Last updated: April 15, 2026

What is it?

hostRequired is a boolean flag in Entri’s configuration (default: true) that controls whether the modal enforces a DNS record host value.

When set to true (as by default), the modal expects a non-root host value (i.e., not @) or a {SUBDOMAIN} placeholder, prompting the user to input a subdomain at runtime. With the placeholder {SUBDOMAIN} , the subdomain added will be shown on the congratulations screen. If no input is provided, the system defaults to www, which is then reflected on the congratulations screen as well.

To bypass this behavior and avoid showing www unnecessarily, set hostRequired as false in the payload.

  • Type: boolean

  • Required?: No — unless you use {SUBDOMAIN} in your dnsRecords

  • Default value: true

  • Where it lives: Top level of the config object passed to showEntri()

Example:

{
  "applicationId": "appID",
  "token": "JWT_TOKEN",
  "dnsRecords": [
    {
      "value": "ring-floor-1187.the.com",
      "host": "test", //or {SUBDOMAIN}
      "ttl": 300,
      "type": "CNAME"
    },
    {
      "value": "_402962b5637f756da4ab7a0608067719.czrmfnbpdk.acm-validations.aws.",
      "host": "_a49d1d3b2b3fe27d0d002d533a751aee.www",
      "ttl": 300,
      "type": "CNAME"
    }
  ],
  "hostRequired": false // or true
}

Expected Behavior:

If hostRequired is true(as by default) and no subdomain is input:

image.png

If hostRequired is true (as by default) and a subdomain is input:

image.png

If hostRequired is false:

image.png

For more details, refer to our developer documentation or contact us at support@goentri.com if you have any questions.