This function returns a specified header from an HTTP request. This function is only available in landing pages, microsites and CloudPages. It cannot be used in other Marketing Cloud applications.



Ordinal Type Required Description
1 String True An HTTP header as defined in RFC 7231

NOTE: Only headers that are available in the page request return a value. For example, if a user pastes a URL into a web browser instead of clicking on a page hyperlink (from another web page), the Referer header value will be empty.


The following example retrieves HTTP headers from a web page session.


var @referrer, @userAgent, @host
set @referrer = HTTPRequestHeader("Referer")
set @userAgent = HTTPRequestHeader("User-Agent")
set @host = HTTPRequestHeader("Host")

Referrer is %%=v(@referrer)=%%
<br><br>User Agent is %%=v(@userAgent)=%%
<br><br>Host is %%=v(@host)=%%


The request will return HTML content from the source URL.

Referrer is

User Agent is Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36

Host is