> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/cortex-xdr-3.x/cortex-xdr-3.x-documentation/cortex-xdr-xql/functions/extract_url_registered_domain.md).

# extract\_url\_registered\_domain

**Syntax**

```programlisting
extract_url_registered_domain ("<URL>")
```

**Description**

The `extract_url_registered_domain()` function returns the registered domain or registerable domain, the public suffix plus one preceding label, of a URL. The function always returns a value in lowercase characters even if the URL provided contains uppercase characters.

**Examples**

**Output examples when using the function**

Returns `paloaltonetworks.com` from the complete URL: `https://www.paloaltonetworks.com`.

```programlisting
extract_url_registered_domain ("https://www.paloaltonetworks.com")
```

Returns NULL for the URL: `//user:password@a.b:80/path?query`

```programlisting
extract_url_registered_domain ("//user:password@a.b:80/path?query")
```

Returns `example.co.uk` in lowercase for the complete URL: `www.Example.Co.UK`, which includes uppercase characters.

```programlisting
extract_url_registered_domain ("www.Example.Co.UK")
```

Returns `paloaltonetworks.com` for the following URL containing suffixes: `https://www.test.paloaltonetworks.com/suffix/another_suffix`

```programlisting
extract_url_registered_domain ("https://www.test.paloaltonetworks.com/suffix/another_suffix")
```

**Complete XQL query example**

Returns one `xdr_data` record in the results table where the registered domain of the URL `https://www.test.paloaltonetworks.com` is listed in the `REGISTERED_DOMAIN` column as `paloaltonetworks.com`.

```programlisting
dataset = xdr_data 
| alter registered_domain = extract_url_registered_domain("https://www.test.paloaltonetworks.com") 
| fields registered_domain 
| limit 1
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/cortex-xdr-3.x/cortex-xdr-3.x-documentation/cortex-xdr-xql/functions/extract_url_registered_domain.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
