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

Regex formula needed for URL http:// & https:// check and add if not there

Topic Labels: Formulas
Solved
Jump to Solution
501 2
cancel
Showing results for 
Search instead for 
Did you mean: 

I am sending URL’s from Webflow which does not have URL validation easily integrated. I want to check and add the https:// to the beginning of the URL if it is not present when the field is created or updated.

I have been looking through to forums but can’t seem to find an exact match. Would love some help with this please.

1 Solution

Accepted Solutions

Welcome to the Airtable community!

Here is one formula.

IF(
    FIND("https://", {url}),
    {url},
    "https://" & {url}
)

Here is a slightly fancier version:

IF(
    OR(
        FIND("https://", {url}) = 1,
        FIND("http://", {url}) = 1
    ),
    {url},
IF(
    {url},
    "https://" & {url}
))

See Solution in Thread

2 Replies 2

Welcome to the Airtable community!

Here is one formula.

IF(
    FIND("https://", {url}),
    {url},
    "https://" & {url}
)

Here is a slightly fancier version:

IF(
    OR(
        FIND("https://", {url}) = 1,
        FIND("http://", {url}) = 1
    ),
    {url},
IF(
    {url},
    "https://" & {url}
))

Hi @kuovonne - Amazing! This works perfectly. Thank you for your very prompt reply!