Why this website ranks so low with Google Page Insights?

I believe this website backend is discourse. Guess how surprised I was when I discovered discourse and Cloudflare doesn’t play nice together?

Average TTFB 235ms! My discourse instance without Cloudflare has a 180 ms TTFB.

I had to disable Cloudflare for my discourse domains, because Cloudflare was decreasing my google page score by 11% and increasing my TTFB by more than 188% in average and as worse as 309% for my target continent!

I beg you guys, please optimize the discourse as it’s open source, so both your own website run faster, but your users can also use your CDN with discourse without incurring in heavy SEO damage.

I don’t recommend anyone to use discourse + Cloudflare ATM because your SEO rankings will suffer!


Google Page Insights:

Only two of the 62 file requests are going through Cloudflare. The rest are loading from discourse/aws, and google. :man_shrugging:


Also - it may be that Cloudflare’s instance of Discourse has a lot more traffic and records to manage, and so, a lot more processing to do. That will drive up the TTFB for sure.

Page speed is relative to the testing site location and target site location geographically. So variance will happen as your own site might be closer to the testing site location. Cloudflare CDN while diverse in 153 data centers and 190 peering locations, will still be subject to the geographic distance between the testing site location and the site origin server geographic location. There’s only so much you can do with current speed of light fibre connectivity.

For example take 2 origins one located in New York and one located in Sydney. Both origins are behind Cloudflare CDN Proxy. And you run webpagetest.org from New York and Sydney test sites to these 2 origins. The results will always show webpagetest.org test from Sydney WPT to Sydney origin as faster than to New York origin and webpagetest.org test from New York WPT to New York origin as faster than to Sydney origin server.

For example testing WPT from dulles, dallas, california, london and sydney locations show this Cloudflare forum’s origin server will most likely be in US West Coast and/or that most traffic that populated CF edge caches are in US West Coast :slight_smile:

With that said, yes discourse isn’t really optimised for some page speed testing tools focused on metrics.

I also get bad results and metrics with my instance running in a beefy server with 0 users and 0 traffic. The issue is discourse itself.

I beg you guys, optimize discourse and publish the code for yourselves and all your clients :confused:

I tried to use a page rule that catches everything, and metrics improved a lot. TTFB went from 600ms with standard caching to 10ms, page load went from 4.7 seconds to 2.6 seconds. Google score went from 59 to 66.

But that would give some weird UI issues, but posting,replying/etc was working OK. I believe this can be fixed if a company as big as Cloudflare wants to!

1 Like

True enough. But I don’t think they are concerned with SEO. It’s already a pretty well established company.

Just FYI…
To me that is not a terribly huge database. The TTFB should be improvable.

Well your Cloudflare customers are concerned with SEO. As it is, I can’t use Cloudflare to CDN my discourse instance because that would make me less competitive in google searches.

Even wordpress blogs can get a 100/100 google score, so why should I use discourse, and if I do, why I should use Cloudflare if it makes every metrics worse?

I can give you guys my discourse URL in private, so you guys can test and see for yourselves. 0 traffic, 0 users.

When I saw Cloudflare used discourse, I thought, well I can’t go wrong with that choice. Turns out a wordpress blog can get better metrics :confused:

Did you read my previous reply Why this website ranks so low with Google Page Insights? - #5 by eva2000 part of optimisation has to come from origin itself as Cloudflare is only a reverse proxy - you can’t accurately compare your discourse install to Cloudflare as geographic distance between test site tool and target site origin location can differ.

I use this tool https://testmysite.io/ and it tests from various locations. My origin server is located in Germany. But enabling Cloudflare makes my metrics worse globally (unless you are caching everything, but that breaks the UI on the first load)

I’ll bite. Can you also give me your server IP so I can make a hosts file entry on my computer? Then you won’t have to toggle the orange/grey cloud and wait for DNS to update.

That would make a difference in your comparisons as Cloudflare community forum’s origin geographic location before the Cloudflare proxy is most like US West coast. I suggest you use other tools too like webpagetest.org as there can be a huge various between different testing tools which may come down to how those test site tool’s servers are configured and their geolocation etc.

I wrote a guide for my users which maybe useful to you as well https://community.centminmod.com/threads/how-to-use-webpagetest-org-for-page-load-speed-testing.13859/

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 https://developers.google.com/web/fundamentals/performance/user-centric-performance-metrics 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: