Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Pull out domain without .com from a URL

Topic Labels: Formulas
468 0
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi guys,

I have a question about a formula regarding a URL. I want to have the domain without all www. etc before the domain and without the .com or whatever.

LEFT(
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE({Website URL}, “http://”,""), “https://”,""), “www.”, “”),
IF(
FIND("/",
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE({Website URL}, “http://”,""), “https://”,""), “www.”, “”))=0,
LEN(
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE({Website URL}, “http://”,""), “https://”,""), “www.”, “”)),
FIND("/",
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE({Website URL}, “http://”,""), “https://”,""), “www.”, “”))-1))

My script is working on the left side and it gives me the URL: airtable.com, which is my goal. Now I want to delete the .com, what do I need to add?

Thanks in advance!

0 Replies 0