Google Sheets Formula for Extracting Domain From Website?

try:

=ARRAYFORMULA(INDEX(SPLIT(REGEXREPLACE(A8:A12, "https?://www.|https?://|www.", ), "/"),,1))

0

enter image description here


UPDATE 1:

=ARRAYFORMULA(IFNA(REGEXEXTRACT(INDEX(SPLIT(
 REGEXREPLACE(A8:A14, "https?://www.|https?://|www.", ), "/"),,1), 
 "\.(.+\..+)"), INDEX(SPLIT(
 REGEXREPLACE(A8:A14, "https?://www.|https?://|www.", ), "/"),,1)))

0


UPDATE 2:

=INDEX(IFERROR(REGEXEXTRACT(A1:A, "^(?:https?:\/\/)?(?:ftp:\/\/)?(?:www\.)?([^\/]+)")))

enter image description here

Leave a Comment