Finds the value for the domain from a valid URL. Input values must be of URL or String type.

In this implementation, a domain value is all data between 1) the protocol identifier (if present) and the sub-domain and 2) the trailing, top-level domain information (e.g. .com).

NOTE: When the DOMAIN function parses a multi-tiered top-level domain such as, the output is the first part of the domain value (e.g. co). To return other parts of the domain information, you can use the HOST function. See HOST Function.

URL literal examples:


Returns the value example


Output: Returns the value e

Column reference example:


Output: Returns the domain values extracted from the myURLs column. 


ArgumentRequired?Data TypeDescription
column_urlYstringName of column or String or URL literal containing the domain value to extract


Name of the column or URL or String literal whose values are used to extract the domain value.


Required?Data TypeExample Value
YesString literal or column reference (URL)

Example - Filter out internal users

Here is some example web visitor information, including the name of the individual and the referring URL. You would like to filter out the internal users, whose referrer values include test-value.

Joe Guy
Ian Holmes
Nick Knight
Axel Adams
Teri Towns


The referrrer values include test-value as a non-domain value and varying URLs from the domain. So, you should use the DOMAIN function to parse only the domain versions of these values. The following evaluates the Referrer column values for the test-value domain and generates true/false answers in a new column accordingly:

Now that these values are flagged, you can filter out the internal names:


Joe Guyhttp://www.example.comfalse
Axel Adamshttp://www.example.comfalse
Teri Towns

Example - Domain, Subdomain, Host, and Suffix functions