I have been using Cloudflare pages for some time, only for small sites[0]. Today I also moved my main blog[1] to it. Both pages are small, so this is not a serious review.
I moved from Netlify. The main reasons are DNS and analytics. I already manage all my DNS with Cloudflare, and having everything in the same place is very convenient. Regarding analytics, Cloudflare provides some very basic analytics, which I think are convenient, in Netlify you need to include your own analytics script or use the paid version. I also noticed pages loaded noticeably faster in Cloudflare Pages.
On the other hand, Netlify is specialized in the kind of sites you would host with Cloudflare Pages, so the overall product is more polished towards that. Also, the site build (at least using Hugo) is a lot faster in Netlify. Instant rollbacks in Netlify are wonderful.
Overall, I really like both products a lot and I would not recommend one over the other. It's also important to consider the limits[2-5] of each one. In the free versions, Cloudflare limits by number of builds, Netlify limits the total build minutes. Netlify has a bandwidth limit, Cloudflare does not mention any bandwidth limit.
I'm in a similar boat, I love both services. Reveddit [1] [2] builds on Netlify with Cloudflare's DNS. I might consolidate into Cloudflare if Pages were to give a free allowance of workers, similar to Netlify's free allowance of Lambda. For now my setup is smooth. I had one hiccup when the site was not responsive, and I fixed that by using CNAMES for subdomains to <your-project>.netlify.app rather than an IP. Upon import from Netlify's DNS, my subdomains were all A records.
With Netlify and CF as DNS I get the basic 30-day high-level analytics from Cloudflare (# unique visitors is all I look at there), along with some results from google analytics for whoever enables that (which seems to be about 50% of traffic).
So I am not sure what benefit I would get for moving right now, other than to satisfy my curiosity of trying something new and consolidating into one 'hosting' service.
> With Netlify and CF as DNS I get the basic 30-day high-level analytics from Cloudflare (# unique visitors is all I look at there)
I added my blog to Cloudflare DNS last night, but all I can see for analytics is total requests. No info on pages visited, or how many visitors. All I see is a button to upgrade to pro to get web traffic analytics :(
> I have been using Cloudflare pages for some time ...
> Today I also moved my main blog to it.
I wish you hadn't. :(
I am so tired of seeing so many "Cloudflare is trying to verify your browser" while it spends eons trying to fingerprint my browser while also blatantly acting like a brand ad for itself ... it's a really bad user experience.
It's a pity that the web is slowly being taken over by Google AMP pages, Cloudflare pages and Captchas ... especially when they "punish" you for using some anti-browser-fingerprinting methods to protect your privacy.
And Cloudlfare's idea of "suspicious" traffic is any browser they can't fingerprint easily - so if you enable privacy settings and use the many privacy browser extensions, you encounter this page a lot when you hit any cloudflare enabled site.
I have three sites on Netlify and I happen to really prefer Cloudflare Pages' UX especially how easily it integrates with DNS and their (basic) analytics like you mentioned. I would love to use them but my site's load time on CF Pages has been much too slow for me.
Thanks for this, very useful! I've been wondering about hosting that gives basic analytics [0], which is sadly absent without signing up and trying for most simple (static site) hosting ones I've seen.
Really, for CF analytics you just need to use their DNS, I don't think they have separate analytics for 'Pages'. Though they have an "app" you can add which technically adds a script (on pages served through their CDN) for more detailed analytics.
Been using it for a few weeks on one of my side projects. Overall pleased but did encounter some problems:
- Builds randomly fail to deploy and without notification (had to push a random commit to master to trigger a new build)
- If using custom domain, there's no way to redirect myproject.pages.dev to myproject.com so I had to use a <link rel="canonical"> on the off chance Google finds my pages link. I also had to use a page rule to redirect all traffic to www
- I'm not exactly sure how (if it's even possible) to set up a staging environment so that every push to master doesn't automatically deploy to production
- All the cache-control headers are "max-age=0, must-revalidate". I had to create another page rule to edit this to 1 year max age for assets that already have contenthash appended to their file names
Hey there. I'm the PM for Pages. That's fair feedback (though a lot could have changed even in the past few weeks, so I would recommend taking another look)
- It's hard for me to tell what's causing the issue (the build logs should give an idea of at least at which stage). One thing we've added over the course of the beta is connection to GH comments, which requires a new type of permission. So that might be causing the failure, but also, failed builds should result in a comment (and email) for notifications, depending on your GH settings. All of that said, my email is rita at cloudflare if you want to forward me more details, I can help look into it.
- Creating a canonical notion of your domain is something we're thinking about. Right now the preview links will set X-Robot-Tag so they can't be crawled but yeah, ideally we want to give you a way to remove myproject.pages.dev if you're not using it
- The cache-control settings are intended to keep your site from serving stale content by relying on etags — your browser should still serve from cache if the asset hasn't been updated. On the Cloudflare site, we have much longer TTLs.
Anyway, thanks for trying Pages! We're continuing to iterate on it, even after GA so should only be getting better :)
It is great that pages.dev is now GA: That happened f.a.s.t! Love the redirect feature; excited about the upcoming integration with Workers, KV, and Durable Objects.
The only thing missing is different build commands per branch and ability to exclude certain branches from builds altogether.
jam.dev are good friends of ours (both founders ex-cloudflare and some of my good personal friends!) :) but was thinking about it more as a play on jamstack.
re: excluding branches — we're actively looking into it!
and yes, that error has been fixed AFAIK, but let me double check.
It would be great to add "clean urls" - removing trailing slash for directory urls, like in firebase:
```
"hosting": {
// ...
// Removes trailing slashes from URLs
"trailingSlash": false
}
```
I have also a lot of problems with builds.
I tried 2 ways od deploying static pages to Cloudflare:
1) gatsby build
2) fully static page (gatsby build on my local computer and push "public" dir to github repo
both ways are generating error:
08:35:00.770 Finished
08:35:01.232 Deploying your site to Cloudflare's global network...
08:54:16.759 Failed due to an internal error
it looks like a hidden limit - build timeout 20 minutes?
My website has 13000 small files (html, js, css, png, webp - max file size is about 300kB)
and I cant deploy it because of this error
I even limited image sizes from 1600px to 800px, and limited files to about 10000 files and still I get error
I have another website with 11000 files and I use "gatsby build" - and build is successful for 1 of 5 tries...
To add to this, when I was trying out CFP, I found it annoying that there was no explicit "build" button. I changed the default branch that I wanted CF to build from, but it didn't automatically make a new build. And there was no button I could click (like there is on Netlify) to say "rebuild now".
+1 for this. Netlify has it and I have used it many times to redeploy a site after changing some config settings (e.g. env vars, build commands). Having git push as the only deployment trigger is a pain in these scenarios.
Do you plan to improve Cache-Control to make cache busting possible? Otherwise, even if the browser has the resource cached, there will still be a round trip to revalidate.
Please give a useful technical description of what Cloudflare Pages is within the first 2 paragraphs. Even the section titled 'What is Cloudflare Pages' is entirely unhelpful marketing drivel:
> Cloudflare Pages radically simplifies the process of developing and deploying sites by taking care of all the tedious parts of web development. Now, developers can focus on the fun and creative parts instead.
It blows my mind how simple products get incomprehensible and convoluted descriptions, creating unnecessary friction in understanding and adopting often brilliant engineering solutions.
Reminds me of the Hollywood blockbusters where one can see the meticulous work of the world’s best production, CGI, make-up, animation artists, the best DPs and designers on the planet, get destroyed by superficial stories lacking originality and imagination.
Interestingly, this is what I was hoping it would be, and their description convinced me it was something else entirely (but I wasn't quite sure what).
I know there have been other helpful answers but figure I’ll offer mine in case it helps anyone compare: it’s basically the hosting aspect of GitHub Pages, with more control over server behavior (hello never expiring cache). If you’re already using their other services, particularly DNS and/or Workers, and static hosting works for you, it’s a great complementing offering.
I've been using it for some time (arewefastyet.rs and a personal blog) and I've been pleased with it so far. It replaced my use of a $5 droplet. Less hassle around deployment and $5 cheaper. The killer feature is probably the previews - the private links allow me to get feedback without pushing to the main site.
It's not perfect, but I'm sure they can fix the quirks soon. My main one was git clone failing and not understanding why("Failed: an internal error occurred"). The other is that I want a way for the pages.dev site alone to be invisible from search engines but couldn't figure out a way to do that with robots.txt. Lastly I wanted to share this feedback during the beta program, but I couldn't find a way other than creating a twitter account and hitting up the PM. Fortunately, this thread saved me from having to do that.
awesome! arewefastyet.rs is a lovely resource, thanks for building it.
> Lastly I wanted to share this feedback during the beta program, but I couldn't find a way other than creating a twitter account and hitting up the PM.
I like that it's easier and easier to host HTML content "for free" on the web.
However, I'm a bit concerned when I look at the size, breadth and growth of cloudfare (ie, cloudfare absorbing the web). As a way to lessen these concerns, I would really, really like it if they were to offer cloudfare pages as an IPFS (or gnunet, hypercore, etc) gateway too.
Modify your pages and publish it on IPFS, have the changes propagated on cloudfare: that would be nice :)
1. CNAME for your.website pointing to cloudflare-ipfs.com
2. TXT record for _dnslink.your.website with the value dnslink=/ipfs/<your_hash_here>
And you have a website hosted on both http and ipfs? I'm stoked!
Thanks a lot for pointing this out! I did encounter cloudfare's IPFS gateway (on libgen, of all the places) shortly after writing my previous comment, but I hadn't imagined they offered such a pages system with it. I don't know if they cache the pages, though?
I just created a new Pages project and deployed it in under 10 minutes.
@rita3ko, it'll be nice if we could change the linked GitHub repository without having to delete and recreate a project.
I'm currently trying it on the staging version of a site from my personal GitHub account, but I'll be moving it to an organisation account soon.
Edit: a button or webhook to trigger a build would be great too. I just changed the production branch from my "main" to "develop" branch, but there's no way to rebuild it short of pushing a new commit.
> Device-based resizing: To make users’ experiences even smoother, especially on less reliable mobile devices, we want to make sure we’re not sending large images that will only get previewed on a small screen. Our new optimization will appropriately resize the image based on whether the device is mobile or desktop.
wait, what? i feel like this needs more details... can we opt out of it if necessary? (say on a per image, or sitewide, or cookie based, basis) it sounds very nice but the loss of control seems concerning?
I've been using Cloudflare Pages for a few of my sites. Been getting issues on one of them for the past few weeks and getting "Failed: an internal error occurred" on the deployment step. I've asked for support and also tweeted [1] but to no avail.
I eventually moved it back to GitHub Pages. My other sites seems okay tho'.
Trying for like an hour to set it up, but it keeps failing on cloning repository. That is definitely not a good first impression, specially because the message doesn't say anything, just 'internal error', so it's impossible to debug and try to fix.
Googling for the error, I found a few similar questions, but all were responded with: go to discord. So... there's absolutely no way to sort it out by myself or without using discord?
```
20:54:21.533 Initializing build environment. This may take up to a few minutes to complete
20:54:56.056 Success: Finished initializing build environment
20:54:56.056 Cloning repository...
20:54:59.840 Failed: an internal error occurred
```
I have a lot problems with builds with this "internal error" too.
I have 2 websites, both gatsby
I tried both:
1) gatsby build
2) fully static files (gatsby build on my local computer) and only public dir added to github repo
Websites 10.000 files and 13.000 files
(small files 1kB to 300kB) html, css, js, png and webp
Sometimes my build is succefull for this 10.000 files website - like 1 of 5 tries
But most build tries fail when deploying:
06:58:47.583 Finished
06:58:48.061 Deploying your site to Cloudflare's global network...
07:18:07.790 Failed due to an internal error
I'm using Netlify for one of my side projects. Liking it so far but been getting annoyed by the limited _headers/netlify.toml config these days (especially custom redirects).
I think it's been the same, just recently I need a way to set custom headers for specific paths. Documentation [1] says that I can use * or :placeholder(s?), but there's no examples other than "/*" (which matches everything).
I thought it can do matches like "/folder/*/*.html" but... actually can't. I try look around in the forums, seeing others got confused as well and in the end I gave up :D
As for redirects, I really like :splat [2], but for my use case, I need something can be matched in the middle of the URL string, e.g.: /blog/:splat/whatever. Maybe this is like a weird use-case, or rather I'm thinking of it like glob patterns or regex.
Congrats on releasing! Cloudflare Tunnel secure localhost public URL looks like a very powerful feature. Is Cloudflare working on a full "Cloud IDE" in-house? It appears all the parts are there, even for just a cloud shell ;)
It’s an interesting product but it’s very barebones. Netlify is a whole company vested in making the same thing as this “side project” by CloudFlare and therefore has a lot more interesting features than just serving static files.
>Whereas Cloudflare really are allowing people to deploy code at 100's of edge locations
Does cloudflare "really" deploy the code to the edge in any sense (e.g pushed to edge nodes, not just cached there)? I was under the impression this product uses some origin (likely, several) they manage, and their cdn.
Also cloudflare has a good number of POPs but I thought it was in the 100-200 range, not 200+
We have hardware in more than 200 cities in 100 countries globally: https://www.cloudflare.com/network/ It is very definitely above 200 locations. And we own the hardware there, we're not piggybacking on someone else's cloud and calling it our network.
They have a great breakdown on their blog[1] around the high-level request flow, but Workers run independently in each POP/colo. They aren't "faked" / running in some more centralized location.
Traffic only has to leave the edge if you want to fetch from _your origins_ behind it, but any responses the Worker generates itself are local to that edge POP. Return a static response, inspect/validate a JWT, modify something on the way out of the cache: all close to the user.
Disclaimer: used to work at Cloudflare, still think it's a great product.
I personally ended up moving mostly everything to AWS. AWS Amplify now simplifies hosting static websites on S3. Automatic builds from GitHub, previews of PR. Route53 is there too. So I can keep all the DNS records, static website, builds in one place. And if I will need to add some server logic - lambdas and more is there too.
I’m not really sure the answer to this but Cloudflare’s beta programs in general are a bit frustrating.
For example, Durable Objects came out a year ago, was impossible to get into (check community forums and Discord, lots of people eager to just tinker concept who couldn’t).
Now, that super interesting technology that supposed to shake things up a bit, has almost ZERO code samples after a FULL year after announcement. I’m not exaggerating. Check GitHub search.
I write this comment because I could have sworn Pages came out of beta already...
Either way, looking forward to deeper tool integration. The idea of your front end and back end application getting to a point of single commit is attractive.
Edit: Not a FULL year, 6 months or so. See note below
A good reminder that static web app hosting is a race to the bottom and filled with options. Do not envy the companies competing in this space.
I think Cloudflare has a ways to go before frontend devs really think of them as anything more than just DNS hosting but this looks very promising and a very smart move on their part. Looking forward to trying it!
> Getting started with Cloudflare Pages is as easy as connecting your repository and selecting your framework and build commands.
> Once you’re set up, the only magic words you’ll need are `git commit` and `git push`. We’ll take care of building and deploying your sites for you, so you won’t ever have to leave your current workflow.
> Supporting static sites is just the beginning of the journey for Cloudflare Pages. With redirects support, we’re starting to introduce the first bit of dynamic functionality to Pages, but our ambitions extend far beyond.
> Our long term goal with Pages is to make full-stack application development as breezy an experience as static site development is today. We want to make Pages the deployment target for your static assets, and the APIs that make them dynamic. With Workers and Durable Objects, we believe we have just the toolset to build upon.
> We’ll be starting by allowing you to deploy a Worker function by including it in your /api or /functions directory. Over time, we’ll be introducing new ways for you to deploy Durable Objects or utilize the KV namespaces in the same way.
> Imagine, your entire application — frontend, APIs, storage, data — all deployed with a single commit, easily testable in staging, and a single merge to deploy to production.
Hi, I'm the tech lead for Workers. (I assume your question is about Workers and not Pages.)
Unfortunately, we can't just take the dotnet CLR or deno off the shelf and deploy them the way we've deployed Workers. To make edge computing possible (with good performance and accessible pricing), it's necessary to be able to host tens of thousands of workers on one machine. That means we can't put each worker in its own container. We need something much lighter-weight. So, we built a custom runtime based on V8 isolates. That means we can only run programs built on JavaScript and Wasm, and written against the specific platform API we provide. (It's true that node and deno are also based on V8, but we use V8 in a very different way in order to achieve our scalability and security goals.)
* Offer a general container hosting service, as an alternative to Workers. There would have to be some down side here in terms of performance or cost, so we'd still recommend using Workers whenever possible. But we could do this...
Transpile really won't work for data intensive applications. Also, for Julia, new permutations of inputs can lead to a newly compiled code.. but, once compiled, that code path is fast. Regardless, I'm hopeful for CloudFlare containers so I could run Julia.
You can execute a bash script as your Build Command, e.g. "./pages-build.sh" which would need to be included in your repo. Within this script, you can install dependencies for an Ubuntu-based system.
I set up my blog on CF pages about a month ago. I guess I chose a domain and did the github flow and that was it, everything clicked and worked on the first try. Haven't had to open the UI since.
I have been using CF for a few years now (dns, caching) but the services they've recently launched have been especially impressive (pages, stream).
We’ve been using Cloudflare pages for Jellyfin’s experimental client[0] and it’s been really nice having automatic deployments on each PR and automatic master builds.
I'm not familiar with jamstack/pages at all, but I get the shivers when I see this magic "_redirects" file in the root of your output directory. This is just bad design. It should not be in the output / public directory, in case someone misconfigures something.
Yeah I understand, but there is an immense amount of scraping going on for "production.env", .htaccess files etc.
It's the same logic that results in publicly open mongo databases.
I end up hosting a lot of static sites on Firebase. I've tried several other ways of hosting static content but usually end up back at Firebase as it's simple and cheap. It does have some quirks though, so I'm interested in trying this out to see how it compares.
Is there any reason now to use Cloudflare "full site caching" (cache everything via Page Rules) instead of this new Cloudflare Pages offering for static sites?
I know in the past, I at least would have my entire static site fully cached with Cloudflare using Page Rules.
What do I lose if I moved over to Cloudflare Pages? E.g. slower site performance, etc?
In regards to your follow-up question, I've been using Cloudflare Pages for a month or so now. I found that it was by default faster than Netlify, and that adding a Page Rule to cache everything made things even a bit faster.
My guess is that by default it's not fully cached at all of their edge nodes, and by adding an aggressive Page Rule, the edge nodes can actually cache my site (which is very small and simple).
If someone already has an existing Cloudflare account on the: Free ($0) / Pro ($20) / Business ($200) tier - do they get Pages included in their existing plan ... or is Pages an incremental cost?
I have a specific need and I'm wondering if any of these static site hosts offer a solution.
I have a static site I made for a friend's business and all they need is the ability to switch out a PDF on the site periodically. The approach I've done so far is to have a simple sinatra app that is password protected and gives them an upload form that replaces the pdf on the server. Do any of these hosts offer an asset manager that would let my friend manage images or pdfs via a simplified admin interface and then rebuild the site with the new assets?
I've migrated my blog [1] and another landing page from Netlify to Cloudflare Pages so far and have been pretty happy with it!
@rita3ko I would love the ability to disable automatic preview builds. My "production" branch which Cloudflare Pages deploys from has a /public directory which I ship, but my other branches are not structured the same and therefore cause build failures. I just don't need preview builds for my use case.
Cloudflare folks: do you have plans to support subdomains? I've been using AWS CloudFront and am pretty happy with it, but the performance claims made by CloudFlare were intriguing enough for me to give it a try.
I tried adding something like blog.domain.tld, and it failed with: "Please ensure you are providing the root domain and not any subdomains (e.g., example.com, not subdomain.example.com)"
Many people would use this service with a subdomain, this is kind of a deal-breaker.
Reading the comments is making me much more interested in Netlify, which I didn't know about. I've been hosting a static site using github pages, and Cloudflare pages looks really interesting.
Worker Sites basically adds a subfolder to your project containing a Worker script that gets deployed to your domain and serves up your build output.
It's lower-level, however it's a better option if you have any dynamic/API parts to your site because you can integrate all of that in a single place in your Worker script.
TL;DR:
Workers Sites is basically an elaborate Worker template (which you can modify) and allows you to deploy your sites using the Wrangler CLI — it'll take care of uploading your assets and all, but you're responsible for setting up CI, etc for a continuous deployment experience.
Cloudflare Pages, by contract, integrates directly with Github, which allows us to offer a lot more features out of the box, including running your build, preview URLs, etc.
I've used it for a couple of sites so far. I really like it because I don't have to worry about deployment, the preview URLs are useful and it's free. I have a couple of quibbles but I'm sure they'd be ironed out sooner rather than later.
I'm not going to rely on Cloudflare Pages personally... It's concerning to see they let free traffic in regions be broken for over 8 hours _without_ redirecting traffic to another working PoP as well[0].
I was personally affected by it, it appears they kept the announcement of the prefixes live in those datacenters but it was similar to being blackholed in those POPs. It caused 8 hour of outages for me and many people I know who go through these POPs.
All the free CF sites I've got were down for those 8 hours via those POPs, and, I had many customers calling to ask why their site was doing and had to explain "sorry, Cloudflare broke just these two POPs..."
Gentle reminder when receiving something for free, it's useful to keep in mind what the other party is receiving from you in return, and in this case, from all your users through your consent. I'm not sure what CloudFlare gain from offering this, but traffic data would seem the most obvious angle.
So I guess from my perspective, I'd treat this with roughly the same scepticism as a free hosting service provided by Google Analytics, at least until the bigger picture is made a little more clear.
It's easier to understand if you're aware of their business model. They have a generous free plan, but if you're building a serious website and need tech support you'd be willing to pay $20/month or more. That's a fair trade. This is similar to the generous free/introductory tiers on other cloud providers.
I moved from Netlify. The main reasons are DNS and analytics. I already manage all my DNS with Cloudflare, and having everything in the same place is very convenient. Regarding analytics, Cloudflare provides some very basic analytics, which I think are convenient, in Netlify you need to include your own analytics script or use the paid version. I also noticed pages loaded noticeably faster in Cloudflare Pages.
On the other hand, Netlify is specialized in the kind of sites you would host with Cloudflare Pages, so the overall product is more polished towards that. Also, the site build (at least using Hugo) is a lot faster in Netlify. Instant rollbacks in Netlify are wonderful.
Overall, I really like both products a lot and I would not recommend one over the other. It's also important to consider the limits[2-5] of each one. In the free versions, Cloudflare limits by number of builds, Netlify limits the total build minutes. Netlify has a bandwidth limit, Cloudflare does not mention any bandwidth limit.
[0] https://litements.exampl.io/ [1] https://ricardoanderegg.com/ [2] https://www.netlify.com/tos/ [3] https://www.netlify.com/pricing/ [4] https://developers.cloudflare.com/pages/platform/limits [5] https://www.cloudflare.com/plans/