Hacker News new | past | comments | ask | show | jobs | submit login
Cloudflare Pages is now Generally Available (cloudflare.com)
338 points by rita3ko on April 12, 2021 | hide | past | favorite | 119 comments



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.

[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/


I highly recommend Vercel too: https://vercel.com/

They have their own React frontend framework with next.js but support any static site and dynamic APIs too.


Vercel does not support IPv6 and HTTP/3 while cloudflare pages already supports both of them.


Is it possible to proxy traffic through Cloudflare so that at least the client —> proxy portion of the traffic is done over HTTP/3?


All my Vercel (NextJS) apps are proxied through Cloudflare without any issues


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.

[1] https://www.reveddit.com/about/

[2] https://github.com/reveddit/reveddit


> 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.


Displaying this page is optional and only used by sites that have suspicious traffic they want to prevent, no?


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.


Look on the bright side: you're probably minting them some bitcoin


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.

[0] https://news.ycombinator.com/item?id=26604015


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.


Netlify also has a feature to apply custom domain/url to branch/preview deployment.


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 :)

(edit: spacing :P)


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.

BTW, now that pages.dev is GA, has the 1xxx errors with Workers when Pages are on a different subdomain, fixed? Ref: https://community.cloudflare.com/t/workers-recently-receivin... | Ticket: 2109407

"Jam harder" a nod to jam.dev? (:

Thanks.

Edit: Might want to update https://developers.cloudflare.com/pages/platform/known-issue...


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.


Cache control could be in config file like in firebase - for example gatsby provide example cache config for firebase:

``` { "hosting": { "public": "public", "ignore": ["firebase.json", "*/.", "*/node_modules/*"], "headers": [ { "source": "*/", "headers": [ { "key": "cache-control", "value": "public, max-age=0, must-revalidate" } ] }, ```

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.


On Netlify I set headers in a config file [1]. With Pages, is the only free option to use the 3 Page Rules?

[1] https://github.com/reveddit/reveddit/blob/fdf159be0e98dbfba6...


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.


managed static site building and hosting.

https://developers.cloudflare.com/pages/


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.


This is a showstopper for me right now and is keeping me on Netlify:

Pages cannot serve files located in a .well-known folder. (https://developers.cloudflare.com/pages/platform/known-issue...)

Otherwise, a fantastic product and a great addition to the ecosystem. The traditional hosting industry (think cpanel etc) hates this btw, so good job!


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.

If you're on Discord, joining our channel is a great way to share feedback: https://discord.gg/HcwPdhDf


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 :)


This might be of interest to you: https://blog.cloudflare.com/distributed-web-gateway/


> Using Cloudflare’s gateway, you can also build a website that’s hosted entirely on IPFS, but still available to your users at a custom domain name.

... Don't tell me it's already doable? This is awesome!!!

https://developers.cloudflare.com/distributed-web/ipfs-gatew...

    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?


Support for simple redirect rules via the `_redirects` file prompted me to switch my personal site over.

I have found Cloudflare Pages to be really, really fast. Much faster than Netlify, although they still win based on UI polish & features.


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.


great launch Rita and team!

> 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 certainly hope it’s opt out but it sounds cool as heck to even have the option to stop thinking about manual optimization or build tools for this


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'.

[1] https://twitter.com/cheeaun/status/1378709230765580293


kristian from pages team here - just DM-ed you, let's get this sorted!


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

it looks like timeout after 20 minutes.. :(


Netlify is quite good. Allows you to install Cloudflare's 10 year backend certificate on it so you can turn on Strict HTTPS checking.


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).


what limitation are you running into? did something change recently?


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.

[1] https://docs.netlify.com/routing/headers/ [2] https://docs.netlify.com/routing/redirects/redirect-options/...


I got that error too but it still worked.


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.


Yeh, but Netlify keeps talking about the edge when they mean a handful of Amazon / Google data centres https://answers.netlify.com/t/is-there-a-list-of-where-netli...

Whereas Cloudflare really are allowing people to deploy code at 100's of edge locations


>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.


Ah thanks, I stand corrected. That's what I get for relying on the Google featured snippet for "cloudflare number of POPs" for checking my memory.

What's the origin setup like for cloudflare pages?


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.

[1]: https://blog.cloudflare.com/eliminating-cold-starts-with-clo...


Ah, thanks, yeah I know workers are legit at the edge, but I meant pages specifically, unless pages are somehow implemented on top of workers?


Pages is indeed implemented on top of Workers.


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 even build an mac/ios app to track analytics from my AWS Amplify websites https://www.outcoldman.com/en/archive/2021/03/14/cloudanalyt...

I have found about the AWS Amplify after switching to Hugo - https://gohugo.io/hosting-and-deployment/hosting-on-aws-ampl...


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


Durable Objects came out in September, it hasn't been a year. You can find documentation and samples here: https://developers.cloudflare.com/workers/learning/using-dur...

We opened the beta up in March: https://blog.cloudflare.com/durable-objects-open-beta/ If for some reason you are having trouble getting into the beta just drop me an email (jgc).


I stand corrected, 6 months or so.

My point about the roll out of these great products still stands as a bit confusing.

I definitely don’t have the answer and am just communicating my experience.

I agree your team’s Documentation is great.


This seems like a good recent feature comparison for Netlify, Firebase, Github, Gitlab, CloudFlare, etc:

https://jace.pro/post/2020-12-17-cloudflare-pages-netlify-ze...


With this + workers it's pretty exciting to have a legit AWS alternative for a serverless stack. Excited to try that out.


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.

What sets it apart from Heroku ?


Pages is for static hosting first, with some dynamism ( think an SPA or just a static site with 1-2 dynamic things). The focus is on the front-end.

Heroku takes your backend application code, and runs it dynamically.


So, no back-end workers. Got it, thanks.


They have Cloudflare Workers, which is a ridiculously great product on it's own.


Anyone from Cloudflare here? Are there any plans for dotnet and/or deno support? I have asked this in Discord but I haven't received any answers.


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.)

More on how our tech works, and the trade-offs involved: https://www.infoq.com/presentations/cloudflare-v8/

In order to support other languages, we basically have two options:

* Find a way to compile/transpile them to Wasm or JavaScript that works in our runtime. This works better than you'd expect but it definitely has limitations. See: https://blog.cloudflare.com/cloudflare-workers-announces-bro...

* 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.


No, my question is about pages.

I want to my publish my deno project as static page. And I want to publish my Blazor project as static page.


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.

Here's a great example someone wrote up for Blazor (wasm) on Pages specifically: https://swimburger.net/blog/dotnet/how-to-deploy-blazor-weba...


Oh... so you're talking about build-time dependencies?


Interested to know how you are building static sites with dotnet.


There are e.g. wyam and Statiq. Then there is Blazor.


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).


Is there some way to instruct GitLab CI to push to CF Pages? I'd like to use the latter, but my repo is on GitLab.


Unfortunately, it doesn't look like it (yet!)[1]

I was really excited to be accepted into the beta, but ultimately didn't want to move stuff to GitHub just for CF Pages.

[1]: https://community.cloudflare.com/t/cloudflare-pages-with-git...


I did manage to work around the limitation by creating a mirror on Github, but it's definitely suboptimal.


This is what bugs me about it too. It’s so dependent on GitHub for no technical reason.


They said GitLab integration is coming, but until then there's only GH, unfortunately.


[unrelated/offtopic]:

Because cf devs may be listening listening, can you please change the css on your blog to this:

    @media only screen and (min-width: 960px)
nav { position: sticky; top: -0.5px; background: #FFF; }

Namely, `top: 0;` to `top: -0.5px`. On Retina screens it shows a small gap above the nav.


What in the heck? I don’t see a gap on my iPhone but I’m curious what the nav contains that would make something like this necessary.


I'm viewing with a 13" macbook air if that helps. Standard zoom level. Can't recall why this happens.


Actually I think it has to do with an element higher in the dom tree having some height or border or something, but I don't remember exactly.


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.

[0] https://github.com/jellyfin/jellyfin-vue


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.


It's nice because it's a very simple file format. Because it resides in the output directory it makes it easy to generate with static site generators.

Also, they probably copied the design from Netlify [1] to improve compatibility and therefore make it easier for people to migrate from Netlify.

[1] https://docs.netlify.com/routing/redirects/#syntax-for-the-r...


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.


Genuinely curious, how could publishing a list of redirects on a static website be harmful?


It reveals site structure but more importantly, it acts as an architectural foundation (location) for the future.


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?

https://support.cloudflare.com/hc/en-us/articles/36002102371...

EDIT:

Follow-up question, what happens if I use Cloudflare Pages and then setup a Page Rule to "cache everything" from Pages?


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).


Dumb question ...

The pricing of Pages is $0/20/$200.

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?


Yes, it's included in the existing plan if you already have Pro / Business.


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?


You can use JavaScript to interact with Github and push a new commit with changed PDF.


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.

[1]: https://jakedeichert.com


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.


Anyone here with insight on how this positions relative to fly.io? (Besides having vastly greater resources backing the effort)


The builtin web analytics alone is a good reason for me to switch from Github Pages to this!


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.


How much different is this product, to Cloudflare worker sites?


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.


There's a bit of background here https://developers.cloudflare.com/pages/migrations/migrating...

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.

Hope that makes sense.


Nice!! I just converted a few low volume hobby sites: simple setup, and I like the simple git push to publish.


Anyone have a review yet?


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 planning to do one when I have time.


is there any example on how to deploy Nextjs to cloudflare pages ?



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].

0: https://www.cloudflarestatus.com/incidents/qjwxv73chh5b


Isn't traffic automatically redirected through anycast networking?


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..."


I'm finding it hard to imagine a customer who can't stand a couple of hours of downtime and also is unwilling to pay $20/month for their website.


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: