Understanding the wwwRedirect Parameter
Last updated: April 21, 2026
What is wwwRedirect?
The wwwRedirect parameter is an optional boolean in entri.showEntri(config) that, when set to true, instructs Entri to configure your user's root domain (yourdomain.com) to automatically redirect to the www subdomain (www.yourdomain.com).
Default value: false
How it works
When wwwRedirect: true is passed, Entri uses the DNS provider's preferred method to set up the redirect. Depending on the provider, this may involve:
Replacing the existing A record at the root domain with redirect infrastructure (e.g. GoDaddy).
Using the provider's native redirect rules.
Using Entri's in-house method via Entri Secure (for providers without native support).
⚠ Important: Because this parameter may modify the root domain, it can overwrite an existing A record that is pointing to a live website. If a site is already running on yourdomain.com, setting wwwRedirect: true may take it offline.
When to use it
Scenario |
|
You want |
|
You are adding a CNAME for a subdomain (e.g. |
|
A site is already live on the root domain and you are only adding subdomain records |
|
Rule of thumb: Only use wwwRedirect: true when the explicit goal is to redirect the bare root domain to www. For any subdomain-only setup, leave it at false.
Provider behavior
wwwRedirect behavior is not uniform across providers. Each provider has its own implementation method, which means the side effects can differ. For a full breakdown of which providers support the feature natively, refer to the wwwRedirect feature support table in the Provider List.
Checking wwwRedirect support before launching the flow
You can use Entri's Check Domain endpoint to verify whether the user's provider supports wwwRedirect before calling entri.showEntri(). The response includes a wwwRedirect boolean field:
{
"provider": "GoDaddy",
"setupType": "Automatic",
"wwwRedirect": false,
...
}
This lets you conditionally set the parameter based on the provider's capability at runtime.
Monitoring redirect status via webhooks
When wwwRedirect is enabled for your applicationId, Entri will report the redirect outcome in webhook events via the redirection_status field:
ValueMeaning | |
| Redirect is live and working |
| Redirect is being propagated |
| Redirect could not be established |
| The |
Common mistake: using wwwRedirect: true for subdomain CNAMEs
Setting wwwRedirect: true while adding a CNAME for a subdomain (e.g. shop.yourdomain.com) is a common source of unintended disruption.
What happens:
Entri adds the subdomain CNAME as requested.
Entri also modifies the root domain to configure the www redirect, using the provider's method (which on GoDaddy, for example, means replacing the existing A record).
Any site running on the root domain goes offline.
The fix is simple: when configuring a subdomain, always set wwwRedirect: false or omit the parameter entirely.
// ✅ Correct — subdomain CNAME only
entri.showEntri({
applicationId: "your-app-id",
token: yourToken,
wwwRedirect: false, // or simply omit this line
dnsRecords: [
{
type: "CNAME",
host: "shop",
value: "yourapp.example.com",
ttl: 300
}
]
});
// ❌ Incorrect — this may also modify the root domain
entri.showEntri({
applicationId: "your-app-id",
token: yourToken,
wwwRedirect: true, // ⚠️ it may overwrite root domain records
dnsRecords: [
{
type: "CNAME",
host: "shop",
value: "yourapp.example.com",
ttl: 300
}
]
});
Need additional help? Contact our support team through the Entri dashboard or visit our help center for more resources.