Why this website ranks so low with Google Page Insights?

Purged cache, disabled page rule caching everything:

Metrics with CDN, standard caching:


Mind you, there is no traffic or users right now. Also my biggest concern is the google metrics, and without CDN I get 67/100 vs 59/100 with CDN.

I know some issues are discourse itself, but I believe you could fix this in various ways:

  1. Optimizing the discourse to remove blocking *.js or *.css
  2. Make so that you can cache those resources without messing up stuff

You guys use discourse yourself…please improve it for yourselves and your clients that want to CDN it too :slight_smile:

can you replicate your results with http://webpagetest.org/ testing tool ?

Ok, using São Paulo as the testing region since it’s where I want to rank best. Origin server is in Germany and yes I know I could get much better metrics just moving to the U.S or South America, but it’s not cost effective and that’s why I looked at CDN in first place. Point is…with CDN i’m still worse than with CDN.


With CDN, no page rules, purged cache, 5 min wait, same location:

The difference is small, but my main concern is SEO, and I rank better without the CDN. It’s a small improvement, but to be honest…SEO is all I care. I don’t care if my website loads 0.2 seconds faster or slower. I care how I rank. And other platforms can provide even better SEO metrics too.

Be the Cloudflare obsessed with optimization we love, and optimize discourse and discourse + Cloudflare together, contribute back so we can have best of both worlds <3

that shows with Cloudflare faster for document complete times TTFB isn’t as important when you compare to first paint, first contentful and meaningful paint and document load times. As those are metrics Google is looking for 사용자 중심 성능 측정항목  |  Articles  |  web.dev and where Cloudflare will help you optimise for

If that is location you want to rank best then you need to move origin hosting from Germany to US East Coast i…e. Miami or Atlanta for better speeds with and without Cloudflare

The difference is 0.2 seconds in load time, does that worth the 10% less score in google insights page? I don’t know. I rather be safe…

All I’m asking is for you guys to take a look and improve a product you guys use too and will help everyone! I think we can all agree there’s a lot of room for improvement.

Discourse is open source. If you can make it better, it’d sure look good on your Resume / Curriculum Vitae.

1 Like

Your webpagetest results show that the site loads faster, is document complete and fully loaded faster using Cloudflare than without it even though the TTFB is longer.

Don’t focus on the pagespeed score itself but the metrics… I can show you a 95 score site that is slower metric wise than a 80 score site and thus 95 score page being slower page load wise than 80 score site. Scores are meaningless without the context (metrics) :slight_smile:

When I search for answers to help people in the forums this community is almost always in the first page of results and then I just copy/paste what @eva2000 posted before to try and look smart.

1 Like

I’m not a developer, or a big business so I can’t make discourse better…but you guys can easily… The only option for people like me is to switch to a platform that achieve higher metrics natively…

And not all websites agree with faster with CDN:

https://gtmetrix.com CDN:

https://testmysite.io CDN:

Google Score: 58/100

Now without CDN:

Google score: 67 / 100

3 testing websites show non-CDN as better and only 1 shows it’s improve loading by just 0.2 seconds. This website ranks good because google trusts the Cloudflare domain and anything with Cloudflare.com will rank well.

I guess I’ll choose the easiest path and get a wordpress blog or something, because I want to target mobile users with mobile data, I’ll get higher google scores and hopefully a under 1 sec loading time.

But at least I tried making discourse better… :roll_eyes:

Edit because I can’t post new replies lol:


But the 2 gtmetrix test locations are the same, and it still shows non-CDN as faster. If I were comparing 2 different locations you’d be correct. My targer users have 4G, not sure how much that helps.

The real issue here is that discourse has 6 render-blocking round trips (11 for your instance) , for javascript and css, and waterfall analysis show most of the time is spent waiting on those scripts. When I had Cloudflare caching those my TTFB went down to 10ms globally.

If we were able to cache domain.com/assets/locales/*.js and domain.com/stylesheets/*theme*.css page load times, TTFB would improve a lot.

I’m going to test page rules to see what can be done. Can I refund them if they don’t work?


@eva2000 I analyzed all the requests and most of them have cache-control max-age=31536000 public,immutable so why they are not getting cached by default?


Should be safe to cache everything. The only request with no-cache is this:

How can I exclude it with a page rule?

That’s because from what I see gtmterix canada test location is closer to your Germany origin without CDN while. Try switching GTmetrix test locations to say London, UK, Mumbia, India, Sydney Australia and Sao Paulo Brazil and see how with versus without Cloudflare fair


That’s what I mean by geographically relative page speed results and where origin server optimisations i.e. choice of web hosting location still matters behind Cloudflare as well as without Cloudflare. For instance my forums has 50% US visitors 40% Asian visitors and 10% Oceania. So my optimal geographic location for my origin is US West Coast as it sits in middle of US and Asian so equal round trip times for majority of visitors.

You won’t get <1s load times for 3G mobile if origin geographic location isn’t optimal for your target visitors. 3G mobile can have up to 300ms round trip time (RTT) that’s 0.3s so further away your origin server hosting is away from test site location = slower speeds - even if you have a CDN in front.

1 Like

yes that is exactly what Cloudflare page rules are for optimising your web application specifically to your needs and is key to getting the most out of your Cloudflare experience :slight_smile:

There’s also other optimisations to be done so look at browser resource hints i.e. rel=preload / preconnect etc Fast load times  |  web.dev and later on resource priority hints which isn’t available in browser support as yet https://github.com/WICG/priority-hints/blob/master/EXAMPLES.md

As to refunds not sure would need to ask Cloudflare billing support.

yes depending on origin location that is expected. For example my forum is in Fremont, California and if i test with Cloudflare (+ base Cloudflare settings) and without Cloudflare from California test server, my origin is usually faster. As test location to origin location distance MAYBE faster that with Cloudflare. Now if you tweak some Cloudflare page rules and optimisations, I can speed it up for California test server tests but an optimally configured origin MAYBE faster when accessed directly without Cloudflare if visitor/test server location is closest to the origin geographic location. CDNs are about optimisation of request/visitor access further away from your origin’s geographic location.

Some optimisations to speed up CF to origin transfer/connectivity would be to use ECDSA based origin SSL configurations https://community.centminmod.com/threads/improving-Cloudflare-connections-to-origin-server-use-ecdsa-ssl-certs.14817/ and eventually use TLS 1.3 at your origin web server when CF supports it Cloudflare speak TLS 1.3 0-RTT with Origin Backend?

This improved my metrics and loading times, but I have one issue:

The first cached layout is served to everyone! If the first access after purging cache is from a phone, it’ll serve the mobile layout to desktops too and vice versa!

@vitor don’t use cache everything for 1st rule

When you compared in first couple of posts this forum’s performance, I looked into community.cloudflare.com discourse instance and looks like majority of assets are not served from Cloudflare but keycdn - now that’s a surprise and may factor into speed you see versus served from Cloudflare !


and some via MaxCDN/netDNA !


seems like a CDN party - there’s also AWS ECS ?

That’s crazy! It’s funny that a CDN is not using itself to serve it own site lol.

Because I couldn’t find much support with the discourse guys and couldn’t get it working 100% I just moved my my instance to miami and I’m running without a CDN now, I have a 69/100 google score.

But if you guys end up discovering what URL’s can work, or how we can integrate Cloudflare better share to everyone :slight_smile:

I think everyone can benefit from that!

seems Cloudflare my not be hosting this forum themselves but via discourse paid hosting so control over CDN usage is out of their hands https://payments.discourse.org/pricing so probably for your comparisons against this forum, it would be against discourse hosted service and not Cloudflare itself

yeah better ideal origin location

Totally safe here. The Discourse layout is responsive. It doesn’t serve a different site based on device.

The issue was my 1st rule. It seems to be safe to cache /assets/* and /stylesheets/* only. But this does not improved my metrics, google score, or loading time in various tests I performed, at best I managed to get very near results to not using a CDN.

I think it’s because the GET domain.com itself takes too long and can’t be cached. So I’m conflicted about using the CDN or not lol.

Thanks for the support guys :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.