# get\_asset\_url is returning two different things

**URL:** <https://community.hubspot.com/t/get-asset-url-is-returning-two-different-things/82993>\
**Category:** CMS Development\
**Tags:** css\
**Created:** [June 8, 2023, 8:53pm UTC](https://community.hubspot.com/t/get-asset-url-is-returning-two-different-things/82993 "2023-06-08T20:53:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![icheshire](https://avatars.discourse-cdn.com/v4/letter/i/bb73d2/32.png) [@icheshire](https://community.hubspot.com/u/icheshire)\
**Post date:** [June 8, 2023, 8:53pm UTC](https://community.hubspot.com/t/get-asset-url-is-returning-two-different-things/82993/1 "2023-06-08T20:53:49Z")

</div>

I wanted to preload my main.css file, so I put a \<link rel=“preload”\> early in the \<head\> and the call to the CSS file later. Both use get\_asset\_url. The preload one returns a hubspot CDN link, but the actual link to the CSS file returns one hosted on my domain. How can I use the same for both?

---

<div class="post-metadata">

**Author:** ![Mike\_Eastwood](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mike_eastwood/32/70075_2.png) [@Mike\_Eastwood](https://community.hubspot.com/u/Mike_Eastwood)\
**Post date:** [June 8, 2023, 9:17pm UTC](https://community.hubspot.com/t/get-asset-url-is-returning-two-different-things/82993/2 "2023-06-08T21:17:18Z")

</div>

Hi @icheshire

I would check the [well hidden] “Default file hosting domain”.

Got to **Settings** (Cog top right) \> **Website** (Bottom Left) \> **Pages** (Sub menu) \> **SEO & Crawlers** (Tab).

There you can change your “Default file hosting domain”.

The default is “HubSpot CDN” but if you change that to your domain then you should see more consistent results.

Did that help?

Mike

p.s. I’m not sure if this setting is available for all tiers/plans

---

<div class="post-metadata">

**Author:** ![icheshire](https://avatars.discourse-cdn.com/v4/letter/i/bb73d2/32.png) [@icheshire](https://community.hubspot.com/u/icheshire)\
**Post date:** [June 9, 2023, 8:35pm UTC](https://community.hubspot.com/t/get-asset-url-is-returning-two-different-things/82993/3 "2023-06-09T20:35:22Z")

</div>

Thanks! Is there any disadvantage to changing the file hosting domain?

---

<div class="post-metadata">

**Author:** ![Mike\_Eastwood](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mike_eastwood/32/70075_2.png) [@Mike\_Eastwood](https://community.hubspot.com/u/Mike_Eastwood)\
**Post date:** [June 10, 2023, 12:25am UTC](https://community.hubspot.com/t/get-asset-url-is-returning-two-different-things/82993/4 "2023-06-10T00:25:40Z")

</div>

Hi @icheshire

As far as I’m concerned it has a minor improvement your [Page Speed Insights](https://pagespeed.web.dev/) score using your domain rather than HubSpot CDN Domain.

I don’t know of any down sides (it’s the same CDN as far as I know).

Cheers

Mike

Disclaimer: I’m a HubSpot Partner, not a HubSpot employee.

---

<div class="post-metadata">

**Author:** ![icheshire](https://avatars.discourse-cdn.com/v4/letter/i/bb73d2/32.png) [@icheshire](https://community.hubspot.com/u/icheshire)\
**Post date:** [June 10, 2023, 2:27am UTC](https://community.hubspot.com/t/get-asset-url-is-returning-two-different-things/82993/5 "2023-06-10T02:27:57Z")

</div>

Thanks! It doesn’t seem to have worked for my purpose unfortunately
