# Assets missing protocol using get\_asset\_url

**URL:** <https://community.hubspot.com/t/assets-missing-protocol-using-get-asset-url/130729>\
**Category:** CMS Development\
**Tags:** starter\
**Created:** [April 29, 2025, 4:11am UTC](https://community.hubspot.com/t/assets-missing-protocol-using-get-asset-url/130729 "2025-04-29T04:11:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![arcknowledge](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@arcknowledge](https://community.hubspot.com/u/arcknowledge)\
**Post date:** [April 29, 2025, 4:11am UTC](https://community.hubspot.com/t/assets-missing-protocol-using-get-asset-url/130729/1 "2025-04-29T04:11:56Z")

</div>

Hey Folks,

Hoping someone may be able to help guide me to a solution on an issue I am encountering with links to assets in my css files. So far this issue appears to be isolated to font files, but I am not sure why.

When I link the fonts via CSS using get\_asset\_url, the generated url is missing protocol (https) in the URL.

Hubspot CSS entry

`url( {{ get_asset_url('../fonts/fa-solid-900.woff2') }} )`

Hubspot Generated URL

`url(//45725153.fs1.hubspotusercontent-na1.net/hubfs/45725153/raw_assets/public/arc-k_dev_theme/assets/fonts/fa-solid-900.woff2)`

I have attempted to link the full path and relative path to the file. In both events, the protocol (https) is missing from the URL.

When I add the protocol (https) to the URL, the file is there.

`https://45725153.fs1.hubspotusercontent-na1.net/hubfs/45725153/raw_assets/public/arc-k_dev_theme/assets/fonts/fa-solid-900.woff2`

I really appreciate any help someone can provide!

---

<div class="post-metadata">

**Author:** ![DianaGomez](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dianagomez/32/48035_2.png) [@DianaGomez](https://community.hubspot.com/u/DianaGomez)\
**Post date:** [April 29, 2025, 4:28pm UTC](https://community.hubspot.com/t/assets-missing-protocol-using-get-asset-url/130729/2 "2025-04-29T16:28:13Z")

</div>

Hi, @arcknowledge 👋 Thanks for reaching out.

Let’s invite some community members into the conversation — hey @BarryGrennan @Anton @LucBenayoun, **@SteveHTM** can you share how you are handling this in your current workflow?

Thank you very much!

Diana

---

<div class="post-metadata">

**Author:** ![SteveHTM](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stevehtm/32/22074_2.png) [@SteveHTM](https://community.hubspot.com/u/SteveHTM)\
**Post date:** [April 29, 2025, 7:15pm UTC](https://community.hubspot.com/t/assets-missing-protocol-using-get-asset-url/130729/3 "2025-04-29T19:15:40Z")

</div>

@arcknowledge - strangely - and I don’t know why this is the case - the HubL function seems ot be defined in such as way that it returns the path but not the protocol.

From the doc page:

 ![SteveHTM_0-1745954061286.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/e/6/e633c2342f015608a20c3e6efb6f34ec43f0c5a0.png)

I guess the use is supposed to be limited to the context of the page compilation system?

Hope this helps!

Steve

---

<div class="post-metadata">

**Author:** ![BarryGrennan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/barrygrennan/32/97794_2.png) [@BarryGrennan](https://community.hubspot.com/u/BarryGrennan)\
**Post date:** [April 29, 2025, 7:32pm UTC](https://community.hubspot.com/t/assets-missing-protocol-using-get-asset-url/130729/4 "2025-04-29T19:32:36Z")

</div>

Yeah, there must be some reasoning behind it.  
But you can get around it by using

`{{ 'https:' + get_asset_url('../fonts/fa-solid-900.woff2') }}`

and maybe to be totally safe

`{{ 'https:' + get_asset_url('../fonts/fa-solid-900.woff2')|regex_replace('https?://', '') }}`

* * *

 ![profile2022a.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/2X/7/7273a34ccfe3489fceebc8a36eca751481b59531.jpeg)

**Barry Grennan**

[Freelance HubSpot CMS Developer](https://www.seoanseo.ca?utm_source=HubSpotCommunity)

[Website](https://www.seoanseo.ca?utm_source=HubSpotCommunity) | [Contact](https://www.seoanseo.ca/#contact?utm_source=HubSpotCommunity) | [LinkedIn](https://www.linkedin.com/in/barrygrennan)
