# Font download fails using apex domain (CORS)

**URL:** <https://meta.discourse.org/t/font-download-fails-using-apex-domain-cors/362649>\
**Category:** Support\
**Created:** [April 20, 2025, 12:37am UTC](https://meta.discourse.org/t/font-download-fails-using-apex-domain-cors/362649 "2025-04-20T00:37:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stonley](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stonley/32/512519_2.png) [@Stonley](https://meta.discourse.org/u/Stonley)\
**Post date:** [April 20, 2025, 12:37am UTC](https://meta.discourse.org/t/font-download-fails-using-apex-domain-cors/362649/1 "2025-04-20T00:37:02Z")

</div>

Hello! I have a 3.5.0.beta3-dev Discourse instance at [https://wingsoffire.forum](https://wingsoffire.forum). The instance is set up under the www subdomain, but I am using Cloudflare CNAME flattening to use the apex domain.

Everything works as expected except that fonts cannot be downloaded. This error is shown using LibreWolf 137.0.1-1:

```plaintext
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://wingsoffire.forum/fonts/Roboto-Bold.woff2?v=0.0.18. (Reason: CORS header ‘Access-Control-Allow-Origin’ does not match ‘*, https://www.wingsoffire.forum, https://wingsoffire.forum’).
downloadable font: download failed (font-family: "Roboto" style:normal weight:700 stretch:100 src index:0): bad URI or cross-site access not allowed source: https://www.wingsoffire.forum/fonts/Roboto-Bold.woff2?v=0.0.18

```

And on stock Ungoogled Chromium 135.0.7049.84:

```plaintext
Access to font at 'https://wingsoffire.forum/fonts/Roboto-Bold.woff2?v=0.0.18' (redirected from 'https://www.wingsoffire.forum/fonts/Roboto-Bold.woff2?v=0.0.18') from origin 'https://wingsoffire.forum' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains multiple values '*, https://www.wingsoffire.forum, https://wingsoffire.forum', but only one is allowed.
GET https://wingsoffire.forum/fonts/Roboto-Bold.woff2?v=0.0.18 net::ERR_FAILED 200 (OK)

```

---

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [April 20, 2025, 7:37am UTC](https://meta.discourse.org/t/font-download-fails-using-apex-domain-cors/362649/3 "2025-04-20T07:37:10Z")

</div>

> [@Stonley](#):
>
> `Access to font at 'https://wingsoffire.forum/fonts/Roboto-Bold.woff2?v=0.0.18' (redirected from 'https://www.wingsoffire.forum`

I don’t see the specific font download when I visit your site, but I do see some resources being loaded from www.wingsoffire.forum and most from wingsoffire.forum.  
This font is also redirecting looking at the error message. That might cause the issue.

You should

```plaintext
./launcher enter app

```

then

```plaintext
discourse remap //www.wingsoffire.forum/ //wingsoffire.forum/

```

---

<div class="post-metadata">

**Author:** ![Stonley](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stonley/32/512519_2.png) [@Stonley](https://meta.discourse.org/u/Stonley)\
**Post date:** [April 20, 2025, 7:43pm UTC](https://meta.discourse.org/t/font-download-fails-using-apex-domain-cors/362649/4 "2025-04-20T19:43:47Z")

</div>

Thanks!

```plaintext
Rewriting all occurrences of //www.wingsoffire.forum/ to //wingsoffire.forum/
WILL RUN ON 'default' DB
THIS TASK WILL REWRITE DATA, ARE YOU SURE (type YES): YES

Remapping tables on default...

post_hotlinked_media=4
post_revisions=12
post_search_data=2
posts=126
site_settings=1
stylesheet_cache=825
topic_links=36
user_histories=10
Done

```

However, there is no change, even after a restart and rebuild. The same errors are given.

Here is the font selection menu in the admin panel.

 ![The image shows a font settings menu where "Roboto" is selected as both the base and heading font, with a default text size set to "normal." (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/2/4/7/247545f10a6fcd050478655e066650f39294fe3f.png)

I can download the font file at [https://wingsoffire.forum/fonts/Roboto-Regular.woff2?v=0.0.19](https://wingsoffire.forum/fonts/Roboto-Regular.woff2?v=0.0.19), but it seems like it’s broken.

 ![The image shows a character properties window for the "Roboto" font, with detailed text in Lorem Ipsum format, indicating that it is set at a size of 10.0. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/4/b/c/4bc46fa8677d9b82317b9e5d3c7aa6fe080cf27b.png)

 ![The image displays a software font package dialog for the "Roboto" font, showcasing its characters, properties, and "Install Font" option. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/4/d/f/4df6efcd0571e488bf18ea3291905fe30349f77a.png)

---

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [April 20, 2025, 10:02pm UTC](https://meta.discourse.org/t/font-download-fails-using-apex-domain-cors/362649/5 "2025-04-20T22:02:44Z")

</div>

Can you try to purge the Cloudflare cache?

 ![image](https://global.discourse-cdn.com/meta/original/4X/8/6/5/865667b9bc22eca992cdf90ce41ab09f0de71a6e.png)

---

<div class="post-metadata">

**Author:** ![Stonley](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stonley/32/512519_2.png) [@Stonley](https://meta.discourse.org/u/Stonley)\
**Post date:** [April 20, 2025, 10:37pm UTC](https://meta.discourse.org/t/font-download-fails-using-apex-domain-cors/362649/6 "2025-04-20T22:37:47Z")

</div>

That fixed it! Thank you, I would never have thought of that.

Happy Easter as well!

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [May 20, 2025, 10:38pm UTC](https://meta.discourse.org/t/font-download-fails-using-apex-domain-cors/362649/7 "2025-05-20T22:38:29Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
