Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Trouble with script loading - Cloudflare Developers
CD
Cloudflare Developers
•
3y ago
•
10 replies
Mumutii
Trouble with script loading
I
'm having trouble with script loading from cdn
.domain
.com
(R2
) and Cloudflare pages on a custom domain which is domain
.com
(for example
)
.
On the url pages
.dev
, the scripts are correctly loaded from the CDN
. Via the custom domain
, it
's as if they were in the public folder
.
Example
:
Page
.dev domain
:
<link rel
=
"stylesheet
" type
=
"text
/css
" href
=
"
https://cdn.domain.com/gpdr/tarteaucitron/css/tarteaucitron.css?v=20220322">
Custom domain
:
<link rel
=
"stylesheet
" type
=
"text
/css
" href
=
"
/css
/tarteaucitron
.css
?v
=20220322
"
>
Page
.dev domain
:
<script id
=
"
" async
=
"
" src
=
"
https://cdn.domain.com/gpdr/tarteaucitron/lang/tarteaucitron.fr.js?v=20220322">
<
/script
>
Custom domain
:
<script id
=
"
" async
=
"
" src
=
"
/lang
/tarteaucitron
.fr
.js
?v
=20220322
"
>
<
/script
>
I only have a rule with a 301 to redirect from domain
.com to www
.domain
.com
(see screenshot
)
.
I must admit that I am lost and I do not understand
.
Do you have any ideas
?
Cloudflare Developers
Join
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
Script does not work with environmental variables
CD
Cloudflare Developers / pages-help
3y ago
Issue with HTML Document loading
CD
Cloudflare Developers / pages-help
7mo ago
Trouble building my app with new image
CD
Cloudflare Developers / pages-help
2y ago
Trouble with terraform plan for cloudflare_pages_project
CD
Cloudflare Developers / pages-help
14mo ago