Identify the Company Domain Name based on an URL inside Salesforce Formula

I’ve been looking for a way to extract the Company Domain Name based on the Website without much success.

We run our Lead to Account matching based on the domain name so it’s primary that we have something clean.

Here is a simple formula that you can copy / paste inside your Salesforce. It will basically take the “Website” field and transform it into a clean domain.

SUBSTITUTE(
if(find("/",if(find("www.",Website)>0,IF(FIND("//",Website)>0,substitute(Website,left(Website,find("//www.",Website)+5),NULL),Website),IF(FIND("//",Website)>0,substitute(Website,left(Website,find("//",Website)+1),NULL),Website)))>0,left(if(find("www.",Website)>0,IF(FIND("//",Website)>0,substitute(Website,left(Website,find("//www.",Website)+5),NULL),Website),IF(FIND("//",Website)>0,substitute(Website,left(Website,find("//",Website)+1),NULL),Website)),find("/",if(find("www.",Website)>0,IF(FIND("//",Website)>0,substitute(Website,left(Website,find("//www.",Website)+5),NULL),Website),IF(FIND("//",Website)>0,substitute(Website,left(Website,find("//",Website)+1),NULL),Website)))-1),if(find("www.",Website)>0,IF(FIND("//",Website)>0,substitute(Website,left(Website,find("//www.",Website)+5),NULL),Website),IF(FIND("//",Website)>0,substitute(Website,left(Website,find("//",Website)+1),NULL),Website))),'www.', '')

Pierre Lechelle

I help Marketing and Sales leaders to better align to maximize efficiency and drive growth.

  LinkedIn - Twitter

Subscribe to the Newsletter

Marketing and Sales are struggling to work together? Subscribe below to get advice on how to unlock your growth.

Popular Posts