Yes, Webflow allows you to reference external CSS or JavaScript files hosted on any server, not just GitHub, as long as the server allows cross-domain access and the file URLs are accessible over HTTPS.
1. Use the Custom Code Areas in Webflow
- Go to Project Settings > Custom Code
- You can add your external CSS in the
<head> section using a <link rel="stylesheet" href="https://example.com/style.css">. - You can add your JavaScript before the closing
</body> tag with a <script src="https://example.com/script.js"></script> tag. - Alternatively, for page-specific scripts, use the Page Settings > Custom Code section and do the same.
2. Requirements for External Hosting
- The file must be accessible over HTTPS. Webflow will block mixed content (HTTP under HTTPS).
- The hosting server must provide proper CORS headers if the JavaScript interacts with other domains.
- The MIME types should be correct—CSS files served as text/css, JS files as application/javascript.
3. Not Limited to GitHub
- You can host assets on:
- Your own web server
- AWS S3 with public access
- Cloudflare R2 or other CDNs
- Any service that can provide publicly accessible file URLs over HTTPS
Summary
Webflow supports linking to external CSS and JS files from any HTTPS-compatible server, not just GitHub. Just insert the proper <link> or <script> tags in the Custom Code settings of your project or pages.