Can I hide the 'http://' in a CMS link?

Hey guys!

I’m using the CMS link field to display certain website URLs as well as link to them by clicking on the text.

I’d just like to make it a bit tidier so the links look like ‘webflow.com’ rather than ‘http://www.webflow.com/’. Those extra bits are added automatically when I put the URL in the field and I can’t remove them. I could add a plain text field, put the simplified URL in, and display that instead, but wanted to check if there’s a better way to do it.

I’m not familiar with code but I can copy and paste. Thanks!


Here is my public share link: Webflow - Nelson Anglicans Test

Welcome to the community @Petra :wave:

Outside of your workaround, you could use some custom Javascript to make this happen:

Keep in mind the above would need some modification to include the “www.” as well, but you should also be able to update the links in your collection to omit that as most sites should work without it.

1 Like

Thanks so much @mikeyevin!

I’ve realised I can’t add the Embed element until I have the paid plan (which I assume is what I need to add that Javascript), but I’ll experiment with it as soon as the boss approves the subscription.

Really appreciate your reply!

1 Like

I believe any custom code requires a paid plan, but in addition to the HTML Embed element you could also add it within the Page or Site Settings :+1:

1 Like

I would like to achieve the same.

Plain text output from a CMS/Collection Link field should be tidied up, with http:// or http:// removes, www. removed, plus the trailing slash removed (if present).

I did look at the above link but remain clueless. Like @Petra I would like to show a tidy version of that URL from the link field, and then, of course, link it using the full URL from that same link field. What is the solution? Thank you!