CDN for your source code
A decade proven way to serve files from source code hostings with proper Content-Type headers
Serving 440M+ requests and 162TB+ of traffic monthly!
Use this URL in production
Use a specific tag or commit hash in the URL (not a branch)
Files are cached permanently based on the URL, query string is ignored
To force-invalidate, paste URL and then click
Use this URL for development
New changes you push will be reflected within minutes
Under high traffic, cache time is automatically extended to keep responses fast
FAQ
Who runs this and how can I get in touch?
Hi, I'm Pavel Puchkin.
For outages, abuse, or general feedback — send me an email. For bugs, please file an issue on GitHub.
If you'd like to support the service, visit my Ko-fi page.
Why is this necessary?
When you request a file from source control hosting services, they are usually served (in the case of JavaScript, HTML, CSS, and some other file types) with a Content-Type of text/plain. As a result, most modern browsers won't actually interpret it as JavaScript, HTML, or CSS. Hosts do this to discourage using repos for static file hosting, since serving raw files is relatively inefficient.
rawgit.hack acts as a caching proxy: it forwards requests to the corresponding service, relays responses to your browser with the correct Content-Type headers, and caches them — briefly for development URLs, permanently for CDN URLs. The result is quick and easy static file hosting right from a repo.
How does rawgit.hack handle HTML files?
rawgit.hack serves HTML as-is, without any filtering. This has been abused to host phishing pages, which causes the service to get flagged by browsers and antivirus software.
To mitigate this, rawgit.hack shows a brief confirmation page before opening any HTML file — it displays the destination URL and asks you to confirm. After confirming, the notice won't appear again for any page in the same repository for 24 hours.
Non-HTML files are not affected. Neither are non-browser clients (curl, wget, etc.). For browser automation tools, set the cookie __Http-phish=1 on the target domain to skip the confirmation.
What source code services are supported?
What's the difference between development and CDN URLs?
Both URL types are served through Cloudflare's global network, but they differ in how long they're cached.
Development URLs are cached for a short time, so changes in your repo show up within minutes. They're designed for local testing and demos where you need fresh content. If a development URL starts receiving high traffic, its cache time is automatically extended up to an hour to keep it fast and reliable — though this is a strong hint to switch to a CDN URL.
CDN URLs are cached permanently based on the exact URL, which makes them fast and reliable for production use. Since the URL includes a specific tag or commit hash, the content never changes — no stale cache surprises. Use these whenever you're embedding files in a real project.
To serve a new version, use a tag or commit ref in the URL instead of a branch name — e.g. /user/repo/TAG/file instead of /user/repo/BRANCH/file. If you need to invalidate a URL immediately, use the purge cache button above, or send a DELETE request from the command line:
curl -X DELETE 'https://raw.githack.com/purge?url=https://...'
If I need guaranteed 100% uptime, should I use rawgit.hack?
rawgit.hack is a free service with no formal uptime or support guarantees — network issues and the occasional outage are real possibilities. That said, URLs are backed by Cloudflare's global cache, so even if the origin goes down, your files keep being served.
The service has been running since 2013 — over a decade — without major outages. You can check the uptime stats and decide for yourself. Keep in mind that most of the time issues are caused by the source code hosting services themselves, not rawgit.hack.
Is rawgit.hack related to RawGit?
RawGit was a similar, now defunct service that inspired rawgit.hack. The main difference is in implementation: instead of a Node.js application, rawgit.hack is built entirely on nginx — which makes it simpler, faster, and easier to maintain.