SuiteCRM trusted hosts configuration

SuiteCRM 8.4.2 added a trusted_hosts setting that rejects requests carrying a Host header you have not approved. This page explains how to set it, how the site_url and localhost fallback behaves, and how to test it behind proxies and load balancers.

On this page

What SuiteCRM trusted hosts configuration protects and when you need it

The trusted_hosts setting decides which hostnames a SuiteCRM 8 instance will answer to. A self-hosted team that runs SuiteCRM behind a reverse proxy or load balancer has to decide which names users, proxies and internal tools may use to reach the application. The setting was introduced in SuiteCRM 8.4.2 to reject requests carrying a forged Host header. Without a restriction, the application can be asked to build links and responses using a hostname the organization never published, which is a risk for anything that generates URLs from the request, such as account emails. Confirm the exact matching rules in the SuiteCRM 8.4.2 or later configuration documentation before you rely on them.

Configure trusted_hosts for any internet-facing deployment and any deployment with more than one hostname. Public names, internal names, regional names and a raw load balancer address each count as separate entries if users or systems reach the CRM through them. Teams that run only on a private network with a single name carry less exposure, but the same discipline still helps when that network later gains a proxy or a second name. Ask your SuiteCRM partner or internal owner what the fallback behavior is when the setting is empty. The topic notes that the application falls back to the configured site_url and to localhost, so you should confirm whether that fallback is acceptable for your topology or whether it allows names you did not intend.

Test the restriction from outside the application before you call it done. Send a request with an unexpected Host header through the same path your users take and confirm the request is refused. Then check that every legitimate name still works, including the health checks that your load balancer sends, since a health check that uses an unlisted name will mark healthy nodes as down. Record the final list in your change process so that adding a new hostname, a certificate or a proxy triggers a review of the setting. Testing behind proxies is where most mistakes appear, so include the proxy configuration in the same change record.

How a request's Host header reaches SuiteCRM through the proxy

The diagram starts with a browser or API client sending a request to the public hostname, which hits the load balancer or reverse proxy first. The proxy forwards the request, including the Host header, to the SuiteCRM web tier, where the application compares that value against trusted_hosts before it builds any URLs or serves a page. Check that the proxy forwards the header you expect, and that unlisted hosts reach the reject path instead of the application.

Host header path from client through proxy to the trusted_hosts check.

Which trusted_hosts value fits each deployment pattern

This table compares common SuiteCRM 8 deployment patterns against the trusted_hosts setting, showing when each pattern fits, what breaks if the value is wrong, and what to confirm in the 8.4.2 or later release notes. Read each row against your own traffic path, from the browser through any proxy or load balancer to the application. The main takeaway is that every hostname a legitimate request can carry must be listed, and nothing else.

Deployment patternWhen it fitsMain risk if wrongWhat to confirm in release notes
Single public hostnameOne user-facing URL reaches SuiteCRM directly or through a proxy that passes the original Host header unchanged.Requests are rejected if the proxy rewrites Host, or if the value omits the exact public name users type.Confirm how the release treats the Host header and whether any proxy header handling is required.
Several hostnames for one instanceUsers reach the same instance through aliases such as a short name, a regional name or a legacy name during a cutover.An alias left out is rejected for some users, while an alias kept after retirement widens the set of accepted hosts.Confirm whether the setting accepts multiple entries and how matching works for each entry.
Internal hostname for health checks or admin accessLoad balancer health probes, monitoring or administrators reach the instance on a private name or address.Probes fail and show as outages, or internal names are exposed to requests from outside the network.Confirm whether health check requests send a Host value and whether that value must be listed separately.
No proxy, direct connectionClients connect straight to the web server with no reverse proxy or load balancer in between.A mismatch between the configured value and the name in the browser breaks login or returns errors on every page.Confirm whether the fallback to site_url and localhost still applies when the list is empty.
Reverse proxy that rewrites HostA proxy terminates TLS and forwards to an internal backend name that differs from the public name.The backend sees the internal name, so the public name fails validation unless it is also listed.Confirm which header the application reads and whether forwarded host headers are trusted by default.
Multi-tier load balancingTraffic passes through a CDN or edge layer before a load balancer and then to several application nodes.Each hop can change the Host value, so one missing name at any tier causes intermittent rejections.Confirm the expected Host value at each hop and test each node individually.
Fallback to site_url and localhostThe setting is left unset, so SuiteCRM falls back to the configured site URL and localhost.Forged Host headers may still reach the app if the fallback allows names you did not intend to accept.Confirm the exact fallback order and whether it applies in your version.

How to set trusted_hosts and verify it before go-live

This sequence confirms that SuiteCRM accepts requests only for hostnames you approve, and that the proxy, configuration and fallback behavior match that decision. It ends with a change record that lets your team repeat the check after later changes.

  1. Inventory every hostname that reaches SuiteCRM

    Before changing any setting, list each hostname that will send requests to this instance. Include the public user address, any internal names used by staff networks, integrations that call the API, scheduled jobs, and health checks from your load balancer or monitoring tool. Check the list against DNS records and the listeners configured on your load balancer, and have the application owner and the platform team sign off on it. The output is a short, approved list that every later step uses.

  2. Confirm the SuiteCRM version is 8.4.2 or later

    The trusted_hosts setting was introduced in SuiteCRM 8.4.2, so an earlier build will not enforce it. Check the version that is deployed to each environment, not only the version in your plan, and compare it with the release notes for the version you intend to run. If the instance is older, upgrade it in staging first and repeat this sequence there. The check is complete when staging and production both report a version that includes the setting.

  3. Set trusted_hosts in the environment configuration

    Add the approved hostnames from step one to the trusted_hosts setting in the environment configuration for this instance. Confirm the key name and value format in the SuiteCRM configuration reference for your exact version, because the format is the part most likely to be entered incorrectly. Keep site_url consistent with the public hostname. The check is that the running environment shows the expected value, and that a second engineer reviewing the file finds no typos or missing names.

  4. Pass the expected Host header through the proxy

    Configure the reverse proxy or load balancer so that requests reach SuiteCRM with the public hostname in the Host header. Review the proxy settings that control whether the original Host header is preserved or rewritten, and confirm the behavior in your proxy's documentation. Then send a test request through the proxy with the public hostname and check the application log or a diagnostic response to confirm the header SuiteCRM received. If the header arrives as an internal name, requests through the proxy will be rejected.

  5. Reload the services as your install requires

    Restart or reload the web server, PHP process manager and any worker processes that read the configuration, using the procedure your installation uses. Clear the application cache if your install requires it, so that the new setting is loaded everywhere. The check is that each service reports healthy after the reload, and that the same request returns the same result on every application node if you run more than one.

  6. Send requests with approved Host headers

    From a machine on each network path in your inventory, send requests to the instance using each approved hostname. Include the user login page, a page that requires a session, an API call if integrations use one, and the health check your load balancer uses. Record the status code and response time for each path. The check is complete when every approved hostname returns the expected response and no legitimate path is blocked.

  7. Send forged and fallback Host headers

    Send requests with unlisted Host headers, including an unknown domain and an internal name that is not on the approved list. Confirm that SuiteCRM rejects them and that the rejection appears in the logs. Then test the fallback: confirm whether requests using the site_url value and localhost are accepted or rejected in your version, and whether that matches your decision. Check that no password reset link or generated URL in a test email uses a forged hostname. Document every result.

  8. Record the configuration in change control

    Add the approved hostname list, the SuiteCRM version, the configuration change, the proxy change, the test requests and their results to your change record. Name the owner who will review the list when hostnames change, such as a new integration or a domain move. Store the record with the other configuration documentation for the instance. The change is complete when a reviewer who was not involved can repeat the tests and get the same results.

Four proxy and load balancer patterns that break host checks

Trusted host checks compare the Host header of each request against a list you define. Most failures in front of SuiteCRM come from the path between the browser and the application, where proxies, load balancers and TLS terminators change or hide the header the application sees.

Proxy rewrites the Host header

Some reverse proxies replace the incoming Host header with the name of the upstream backend, so SuiteCRM sees an internal name rather than the public address users type. The usual symptom is that every page returns a rejected-host error after a proxy change, while direct access to the application server still works. Check whether your proxy sets a preserve-host option, and confirm that the value reaching PHP matches an entry in trusted_hosts for every public name in use.

Health checks by IP address

Load balancers often probe backends by IP address, and the probe request then carries the IP in its Host header. If that probe hits a SuiteCRM route, the check fails, the balancer marks the node unhealthy and removes it from rotation, even though users could sign in. Confirm which path and host value your health monitor uses, and either point the probe at a route that does not depend on host matching or add the probe address deliberately after a security review.

TLS termination with internal hostnames

When the load balancer terminates TLS and forwards plain HTTP to the web server, the internal request may use a hostname such as an app node name. The public name is then only visible in forwarding headers, which SuiteCRM does not read for host matching unless your web server and PHP configuration pass it through. Confirm what the backend receives on a test request, and document which name the trusted list must contain for browser sessions to work.

Several sites on one proxy

A single proxy that serves more than one SuiteCRM instance or tenant can route each hostname correctly yet still send requests to a shared backend pool. A trusted list that holds only one tenant's name will reject the others, and a list that is too broad can accept names you never meant to serve. Map each public name to its backend in writing, keep the list limited to those names, and test every tenant's sign-in page after each change.

What the site_url and localhost fallback means for your configuration

When trusted_hosts is not set or is incomplete, SuiteCRM falls back to the value of site_url and to localhost. That fallback is the part of this setting most likely to surprise a team, because a missing entry does not always fail in the same way. Depending on which path a request takes, the same hostname can be accepted in one environment and rejected in another, or accepted through localhost even though no one meant to allow it. Before you rely on any of this, confirm the exact precedence in the 8.4.2 documentation for your installed version, including whether site_url and localhost are both used or whether one replaces the other when trusted_hosts is present.

Treat the fallback as an open question until you have tested it. Ask your implementation partner or the SuiteCRM documentation which hostnames each path accepts, and record the answer in your configuration notes. Then, in a staging instance that mirrors production hostnames, run the same set of requests twice: once with trusted_hosts set to the full list of production and staging hostnames, and once with it unset. Include the public hostname, any internal hostname used by health checks, and a request with a forged Host header. Compare the status codes and the generated links in each case, since an unexpected link that points to the wrong host is a sign that the fallback is in use.

Use the results to decide what the production configuration must contain. A short, explicit list is easier to audit than relying on fallbacks, and it should be reviewed whenever a hostname, load balancer or certificate changes. Note in your change process that a DNS or proxy change can alter the Host header that reaches SuiteCRM, which can turn a previously working configuration into a silent rejection or an unintended acceptance. Repeat the two-state test after each such change.

How to test trusted_hosts in staging, production and behind each proxy

Staging should reproduce the full request path that production uses, including every load balancer, reverse proxy, TLS terminator and header rewrite. The trusted_hosts check runs against the Host value the SuiteCRM application receives, so a staging server that accepts connections directly from the test machine tests a different path. Before you start, write down the expected outcome for each case, using the baseline from your own staging run after you set the values.

  • Approved hostnames: send requests using each public hostname listed in trusted_hosts, then confirm the login page and a record view load normally.
  • Forged Host headers: send requests with unlisted Host values through the same proxy chain, and record the response and any log entry each one produces.
  • Health checks: call the health endpoint your load balancer uses, with the Host value the probe actually sends, and confirm the probe is not blocked.
  • API calls: repeat the approved and forged cases against the API paths your integrations use, with a test token that has a narrow role.

Compare each result with the expected outcome you wrote down. Keep the captured responses and log lines as a test record for the change ticket.

Security risks a host allow-list closes and the ones it does not

A trusted hosts setting narrows one specific weakness: applications that build links and routing decisions from the incoming Host header. It is one control among several, and the cards below separate the risks it closes from the risks that need login, 2FA and patching controls covered on the related pages in this hub.

Host header injection in generated links

If SuiteCRM builds password reset or other emailed links from the request's Host header, an attacker who can make a victim send a request with a forged host can steer the link to a domain they control. Confirm that every reset and notification link uses the configured site URL, and test the password reset flow with a forged Host header on a staging instance before and after you set trusted hosts.

Cache poisoning through forged hosts

A shared cache or reverse proxy that stores responses keyed only on the path can serve a page generated for a forged host to other users. A strict host allow-list makes SuiteCRM reject those requests before they produce cacheable output. Ask your proxy team which headers are part of the cache key and confirm that responses for unknown hosts are not stored.

Misrouting between tenants

When one SuiteCRM codebase or one ingress serves several hostnames, for example separate brands or business units, a request for one name must not reach another unit's data or configuration. The allow-list should name only the hostnames each instance is meant to answer, and each name should be tested with a logged-in user from the other unit to confirm the request is refused.

Risks the host check does not stop

A host allow-list does nothing about weak passwords, missing two-factor authentication, over-broad roles, unpatched code or injection flaws inside a valid host name. Those risks need their own controls: review the login throttling, two-factor authentication, role design and patching pages in this hub, and include them in your penetration test scope.

Lockout from a misconfigured allow-list

An allow-list that omits the public hostname, the internal health check name or the name a load balancer forwards can block administrators and monitoring alike. Record every name in use before the change, add a rollback step that restores the previous setting, and keep one administrator session open while you test from a second network path.

How much effort does trusted hosts setup take and what must your team provide?

How much effort does a single-hostname trusted hosts setup take compared with a multi-proxy environment?

A single hostname behind one reverse proxy is the smallest version of this work: one value to set, one request path to test, and one check that the application responds only to its public name. A multi-proxy environment, such as a CDN in front of a load balancer in front of two web nodes, multiplies the work because each hop can rewrite or pass through the Host header differently. The effort grows with the number of distinct paths a request can take, not with the size of the application. Ask any provider to state which of these two shapes their estimate assumes before comparing quotes.

What drives the effort of trusted hosts configuration?

Four factors drive most of the effort:

  • The number of proxies and load balancers that sit between users and SuiteCRM, and whether each one forwards the Host header unchanged.
  • The number of hostnames that must be accepted, including internal names, legacy names and any alias used for email links or the SAML callback.
  • Change control, meaning how many approvals a config change needs in your organization and how often it must be rolled out.
  • Test coverage, meaning whether someone checks forged Host headers, normal logins, password reset links and API calls after each change.

Each factor can be sized in your own environment before any quote is requested.

What must our team provide before a provider starts trusted hosts work?

The provider needs access and information that only your team holds:

  • Administrative access to each proxy and load balancer configuration, or a change window in which your staff apply the changes.
  • A DNS and hostname inventory listing every public and internal name that reaches SuiteCRM, with the owner of each record.
  • A staging copy of SuiteCRM 8 that matches production's proxy chain, so header behavior can be tested without touching live users.
  • Your current site_url value and the list of places it is used, such as SAML or email links.

Missing any of these typically moves work into discovery, which should be stated in the quote.

Can our own team configure trusted hosts without outside help?

Yes, for a single hostname behind one proxy that your team already operates. The setting itself is a configuration value, and the testing is a set of requests that your engineers can run with a tool such as curl against staging. Outside help adds the most value when several proxies rewrite headers, when SAML or LDAP sign-on depends on exact hostnames, or when your change process requires documented test evidence. Decide based on how many hops you run and whether your team has tested header forwarding before.

What should we ask a provider to confirm in a trusted hosts quote?

Ask the provider to confirm, in writing:

  • Which proxies, load balancers and hostnames are in scope, and which are excluded.
  • The test cases, including forged Host headers, each public hostname, login, logout, password reset and API paths.
  • Who makes configuration changes in production and who approves them.
  • Whether a staging run is included and how many rounds of retesting are covered.
  • What your team must supply, and what happens if the inventory changes during the work.

A quote that cannot answer these questions is describing a different scope than the one your environment needs.

How does the trusted hosts setting interact with SuiteCRM upgrades and patches?

The trusted hosts value is part of your environment configuration, so it must be checked after each upgrade or patch that changes configuration handling, and it should be included in the staging test each time. SuiteCRM patch releases contain only security and bug fixes with no database changes, which makes them easier to schedule, but a change to proxies or DNS made between releases can still break host validation. Record the expected hostname list with each release so a failed check is quick to diagnose. Confirm the current behavior against the SuiteCRM documentation for the version you run.

What does ongoing trusted hosts maintenance involve after go-live?

Maintenance is recurring work tied to change. Each new hostname, certificate change, CDN addition or load balancer replacement needs a matching trusted hosts update and a repeat of the forged Host header test. Assign an owner for the hostname inventory and make the check part of the change ticket. Retainer support from a provider can cover this recurring testing, but the scope and frequency should be written into the agreement so it is not assumed.

Limits to confirm in your environment before you rely on trusted_hosts

The trusted_hosts setting only protects what it actually sees, so each item below is a limit to confirm before you treat it as a control. Confirm each one against the SuiteCRM documentation or with your own test results, and record the answers in your change record.

Confirm the minimum release level

The setting was introduced in SuiteCRM 8.4.2, so an instance on any earlier 8.x release has no trusted_hosts protection at all. Check the installed version on the admin pages and in the deployed code, not only in the deployment ticket, because the two often drift after a manual patch. Only the current 8.x line receives routine fixes, so plan to test on a version that is also on a supported patch level. Check the compatibility matrix for the PHP, Apache and database versions that your release supports.

Read the release lifecycle

Verify the exact syntax and value formats

Before you write any value into the configuration, confirm the key name, the accepted format and how multiple hosts are listed in the release documentation for your version. Check whether entries accept ports, wildcards, subdomains or IP addresses, and whether the value is read from an environment variable or a config file. A value that looks correct but is ignored leaves the instance open to forged Host headers without any visible error, so test one rejected request after every change.

Check behavior across 8.x patch releases

SuiteCRM publishes minor 8.x releases roughly every eight weeks, and patch releases carry only security and bug fixes with no new features or database changes. Still, do not assume the trusted_hosts logic is unchanged between patches. Re-run your Host header tests after each patch, and compare the release notes for any change to how the host is validated, falling back to site_url or handling localhost. Track the version you tested against in your runbook.

Review the release notes

Confirm how your proxy handles the Host header

A reverse proxy or load balancer may pass the client's Host header unchanged, rewrite it to a backend name, or add forwarded headers that the application reads instead. Each choice changes which value trusted_hosts compares. Send a request with a forged Host header through the full path, from the public address to the application, and confirm the request is rejected. Also confirm the value the application sees when a legitimate user requests the public name, and check that health checks from the load balancer still pass.

Test every entry point, including legacy paths

Confirm whether the check applies to the login page, the API, the scheduler and worker endpoints, and any entry points kept from earlier versions. Legacy files can sit outside the main routing path, and the migration documentation notes that a move from SuiteCRM 7 may remove non-core files under the public/legacy folder, so review what remains on the server. Send forged Host headers to each entry point you expose and record the result. A check that covers the login page alone does not cover the API.

Read the migration notes

How DeployOpen works on this

DeployOpen plans, implements, hardens and supports self-hosted SuiteCRM inside your own infrastructure, including the trusted hosts setting and the proxy and load balancer path that sits in front of it. Each engagement starts from a written scope, so the host configuration, the tests and the handover are agreed before any change is made to your environment.

How we scope

  • We map every public hostname, proxy, load balancer and internal address that reaches your SuiteCRM 8 instance.
  • We record the intended value of trusted_hosts and site_url for each environment, including staging and disaster recovery.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.

How we build

  • We set trusted_hosts in each environment and confirm that unlisted Host headers are rejected with a test request.
  • We check how the proxy forwards the Host header and align the load balancer rules with the configured hostnames.
  • We test behind your real routing path, including forged Host header requests, and record the results for retesting after changes.

How we hand over

  • You receive a written configuration record listing each hostname, the setting values and the reason for each entry.
  • We document the test cases so your team can rerun them after patches, proxy changes or new hostnames.
  • Your team walks through the runbook for adding a hostname, so changes go through the same check every time.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers, covering host checks after each SuiteCRM release.
  • We retest the host configuration whenever your load balancer, DNS or certificate setup changes.
  • Support scope and response arrangements are defined in the written agreement, so you know what is covered before you sign.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.