Skip to main content
Workday User Guide
Last Updated: 2023-06-23
URL_HOST

URL_HOST

Description

URL_HOST
is a row function that returns the host, domain, or IP address portion of a URL string.

Syntax

URL_HOST
(
URL_string
)

Return Value

Returns the host portion of a URL as a
TEXT
value, or
NULL
if the input string is not a valid URL.
For example, in the string
http://www.workday.com/company/contact.html
, the host portion is
www.workday.com
.
In the string
http://admin:admin@127.0.0.1:8001/index.html
, the host portion is
127.0.0.1
.
In the string
mailto:username@mycompany.com?subject=Topic
, the host portion is
NULL
.

Input Parameters

URL_string
Required. A field or expression that returns a
TEXT
value in URI (uniform resource identifier) format of:
protocol
:
authority
[/
path
][?
query
][#
fragment
]
.
The authority portion of the URL contains the host information, which can be specified as a domain name (
www.workday.com
), a host name (
localhost
), or an IP address (
127.0.0.1
).

Examples

Return the host portion of URL string values in the
referrer
field:
URL_HOST([referrer])
Return the host portion of a literal URL string:
URL_HOST("http://user:password@mycompany.com:8012/mypage.html")
returns
mycompany.com
.