CloudFlare is an awesome reverse cache proxy and CDN that provides DNS, free HTTPS (TLS) support, best-in-class performance settings (gzip, SDCH, HTTP/2, sane Cache-Control
and E-Tag
headers, etc.), minification, etc.
- Make sure you have registered a domain name.
- Sign up for CloudFlare and create an account for your domain.
- In your domain registrar's admin panel, point the nameservers to CloudFlare's (refer to this awesome list of links for instructions for various registrars).
- From the CloudFlare settings for that domain, enable HTTPS/SSL and set up a Page Rule to force HTTPS redirects. (If you want to get fancy, you can also enable automatic minification for text-based assets [HTML/CSS/JS/SVG/etc.], which is a pretty cool feature if you don't want already have a build step for minification.)
- If you don't already have one, create a new repository on GitHub to store your site's contents (preferably in the form of static web pages and assets; though not necessary, for the A-Frame site we use a static-site generator called Hexo).
- From your domain registrar's settings, create a
CNAME
record to point<domain>.<tld>
to<user>.github.io
. (Refer to the GitHub docs for more information.) - In your Github repo, create a file at the root called
CNAME
containing the domain name (e.g.,aframe.io
). - Push to GitHub Pages (either by pushing to
gh-pages
ormaster
of your repo; or you can use themaster
branch of a repo named<org>.github.io
- example: https://github.com/aframevr/aframevr.github.io/ automatically gets published to https://aframevr.github.io/, which redirects to https://aframe.io/) - You're done! All content will now be served to your users from CloudFlare.
If despite all that, you're still getting: "404 File not found The site configured at this address does not contain the requested file." your repo might be configured to use:
main
instead ofmaster
branch. You may try to change default repo back tomaster
, but Github Pages doesn't seem to care about that (you may have to modify Actions/Workflows)... but hey don't worry, at least you support some good cause, the more time youwaste/spend on things like this !