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 B2B SaaS companies to build & manage high-performance Marketing teams so that you can build a sustainable business.

  LinkedIn - Twitter

Subscribe to the Newsletter

Want to grow your business? Get advice to grow faster with Growth Marketing straight into your inbox. Subscribe below.

Popular Posts