Redirect()

Redirects landing page visitors to a different URL.

Availability 

Marketing Cloud Engagement ✅ Yes
Marketing Cloud Next ❌ No

Syntax 

1Redirect(redirectUrl)

The Redirect() function has one parameter:

  • redirectUrl (string): Required. The URL to redirect to.

Usage 

To use the function, pass it a URL to redirect to. Place the function on a landing page.

1%%=Redirect('https://example.com')=%%

The page returns an HTTP 302 response, and the customer is automatically redirected to the new URL.

A common use case is to combine this function with Concat() to pass a query parameter. This example concatenates the customer’s subscriber key to a URL string.

1%%[
2  Set @SubscriberKey = _subscriberKey
3  If not Empty (@SubscriberKey) then
4    Redirect(Concat('https://www.example.com&key=', @SubscriberKey))
5  EndIf
6]%%