Answers.Body: <p>Most likely, you need to account for artifacts/artifact URLs: <a href="https://craftcms.com/knowledge-base/cloud-builds#artifact-urls" rel="nofollow noreferrer">https://craftcms.com/knowledge-base/cloud-builds#artifact-urls</a></p>
  <p>But if that’s not it, hit us up at support@craft.cloud, and we'll figure it out!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-10-17T13:22:52.093Z
Answers.Text: "I'm 100% deploying the files (I can see them in my GitHub)" – it sounds like that means you're _not_ building these in our node pipeline, which is fine. However, as Brad mentioned, you still need to use the `cloud.artifactUrl()` template functions to render these URLS.
  
  Even though they're part of your repo, Craft Cloud, by design, will only serve _Craft requests_ from your main domain. Static assets will be routed through the CDN, and thus need to be referenced via the `cloud.artifactUrl()` tag.
Answers.UserDisplayName: Tim Kelty
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-10-17T13:28:49.730Z
Answers.Text: FWIW, Removing this restriction is on our roadmap, which would allow things to work without template changes: https://github.com/craftcms/cloud/discussions/9
Answers.UserDisplayName: Tim Kelty
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-10-17T04:31:50.937Z
Answers.LastActivityDate: 2024-10-17T04:31:50.937Z
Answers.UserDisplayName: Brad Bell
Body: <p>I have setup a new project using craft cloud, locally everything works fine. But on the production site, it gives a  404 error on the stylesheets, and I do not understand why.</p>
  <p>This is all I know:</p>
  <ol>
  <li>Trying to go directly to the file url does not work either.</li>
  <li>Normal images (uploaded through the cms) works.</li>
  <li>Everything works locally</li>
  <li>I'm 100% deploying the files (I can see them in my GitHub)</li>
  </ol>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-10-14T15:45:28.507Z
Comments.Text: I would probably recommend contacting P&T support for help with this.
Comments.UserDisplayName: Jalen Davenport
Tags: <css><craft-cloud>
Title: Craft Cloud, CSS not working
ThreadText: # Craft Cloud, CSS not working
  
  (Asked by: username_0 on 2024-10-01)
  
  I have setup a new project using craft cloud, locally everything works fine. But on the production site, it gives a 404 error on the stylesheets, and I do not understand why.
  
  This is all I know:
  
  1. Trying to go directly to the file url does not work either.
  2. Normal images (uploaded through the cms) works.
  3. Everything works locally
  4. I'm 100% deploying the files (I can see them in my GitHub)
  
  **Tags:** css, craft-cloud
  
  > **Comments:**
  > **username_1**: I would probably recommend contacting P&T support for help with this.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2024-10-17. Score: 2 | Accepted answer
  
  Most likely, you need to account for artifacts/artifact URLs: <https://craftcms.com/knowledge-base/cloud-builds#artifact-urls>
  
  But if that’s not it, hit us up at support@craft.cloud, and we'll figure it out!
  
  > **Comments:**
  > **username_3**: "I'm 100% deploying the files (I can see them in my GitHub)" – it sounds like that means you're _not_ building these in our node pipeline, which is fine. However, as username_2 mentioned, you still need to use the `cloud.artifactUrl()` template functions to render these URLS.  Even though they're part of your repo, Craft Cloud, by design, will only serve _Craft requests_ from your main domain. Static assets will be routed through the CDN, and thus need to be referenced via the `cloud.artifactUrl()` tag.  
  > **username_3**: FWIW, Removing this restriction is on our roadmap, which would allow things to work without template changes: https://github.com/craftcms/cloud/discussions/9  
  
  ---
  
  