---
schema_version: "1"
id: 6322bd82abcbf033ae06ff44eddea4de589c3a543e5ad04c97b18196c9875713
title: Setting Query String Parameters in Links
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/salesforce-pages-developers-guide/guides/pages/quick-start/pages-quick-start-query-params-setting.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/guide/pages-quick-start-query-params-setting.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 34a759ef10b4db413aa6116f584b27e01d1d969b6265c6d1ab509ec160b5b440
products:
  - Visualforce Developer Guide
  - Platform Developer Content
---

# Setting Query String Parameters in Links

You can set query string parameters in links to pages by constructing the link URL manually, or by using `<apex:param>` tags within the `<apex:outputLink>` tag. For example, both of the following examples create identical links to an external page:

```visualforce
<apex:outputLink value="http://google.com/search?q={!account.name}">
    Search Google
</apex:outputLink>
```

```visualforce
<apex:outputLink value="http://google.com/search">
    Search Google
    <apex:param name="q" value="{!account.name}"/>
</apex:outputLink>
```

The latter method, which uses `<apex:param>` tags instead of manually creating the URL, is preferable for stylistic reasons.

**note:** In addition to `<apex:outputLink>`, use `<apex:param>` to set request parameters for `<apex:commandLink>`, and `<apex:actionFunction>`.

