split_host: Split host into subdomains and domain

View source: R/split.R

split_hostR Documentation

Split host into subdomains and domain

Description

Split host into subdomains and domain

Usage

split_host(host)

Arguments

host

A character vector of hostnames to be split.

Value

A tibble with one row per hostname and columns for top-level domain, domain and subdomains. Columns are created as many as the number of hosts' components and are named as tld, domain, subdomain_1, subdomain_2, etc.

Examples

split_host(c("subdomain.example.com"))
split_host(c("subdomain2.subdomain1.example.com", "example.com"))

urlexplorer documentation built on Aug. 8, 2025, 7:29 p.m.