Customize Allowed Domains for the Search the Web Agent Action

Limit web search results to specified websites by defining allowed domains for the Search the Web agent action so your agents retrieve information from trusted sources.

Required Editions

Available in: Lightning Experience
Available in: Enterprise, Performance, Unlimited, and Developer Editions. Required add-on licenses vary by agent type.
User Permissions Needed  
To build and manage Employee agents:

Manage AI Agents

OR

Customize Application

Note
Note The Search the Web agent action isn’t supported in Government Cloud.

Customize Allowed Domains

Allowed domains determine which websites the Search the Web action can return results from.

Important
Important To make changes to your agent, it must be in a draft state. If your agent is committed, create a draft.
Note
Note These steps cover one way to set allowed domains in Agentforce Builder. You can also set the allowed domains in Script view.

  1. From the App Launcher, enter Agent, and select Agentforce Studio, and then click Agents.
  2. Select the agent that you use for web search. If you don’t have a web search agent, click New Agent and create one.
  3. In the Explorer panel (1), expand Subagents (2) and select the General Web Search (3) subagent.
  4. Under Actions Available For Reasoning, expand Search The Web (4).
  5. Next to the Allowed Domains input, click the value dropdown (5), and then select Create a variable (6).
    To enter domains directly instead of using a variable, if the value shows Agent Populated, select Remove variable. Click the value again, select Empty String, and then enter the domains.
    Agentforce Builder showing the General Web Search subagent with Search the Web action expanded and Allowed Domains input highlighted
    The Create Custom Variable dialog opens.
  6. In the Create Custom Variable dialog, enter a name for the variable and configure the variable’s settings.
  7. In the Default Value field, enter up to 10 allowed domains as a comma-separated list. For example: salesforce.com, example.org.
    Enter domains without http://, https://, or www. The action accepts these prefixes, but they aren’t required.
    Create Custom Variable dialog showing the Allowed Domains variable with Default Value field for comma-separated domains
  8. Click Create.
  9. Save your changes.

Customize Allowed Domains in the Legacy Builder

  1. From Setup, in the Quick Find box, enter Agent, and then select Agentforce Agents.
  2. Select the agent that you use for web search, and click Open in Builder. If you don’t have a web search agent, click New Agent and create one.
  3. If your agent is active, deactivate it.
  4. In Agentforce Builder, open the General Web Search subagent. If you don’t have the subagent, add it from the asset library.
  5. Select This Subagent’s Actions.
  6. Select Search The Web.
  7. Click Edit Action.
  8. In the Inputs section, navigate to Allowed Domains, and enter up to 10 allowed domains as a comma-separated list in the Configuration Input field. For example: salesforce.com, example.org.
    Enter domains without http://, https://, or www. The action accepts these prefixes, but they aren’t required.
  9. Save the action.