Cloudflare DNS negatively impacting my Lighthouse mobile score?

I recently set up CloudFlare DNS over the weekend and support have kindly confirmed for me that it is all good to go.

However - it seems that whilst i can see there has been incremental improvement in scoring on GTMetrix and Google Page Speed Insights on DESKTOP, my mobile speed scores has been negatively impacted!

Which is rather strange and confusing to me as part of the reason for setting this up was to help improve speed/scores. Please find the following details: ==>


Domain name: gmg.asia
Parked at : GoDaddy
Hosting on SiteGround (Originaly hosting on GoDaddy as well but there were so many problems)

Nameservers still on GoDaddy
so made the necessary CNAME adjustments on the DNS register:

CNAME www www.gmg.asia.cdn.cloudflare.net
CNAME cloudflare-resolve-to @

A record points to the IP address at SiteGround

I ran Google Speed Insights for both
https:// www.gmg.asia
https:// gmg.asia

and came up with the new negative impacts compared to previously (pre CDN deployment)

https://www.gmg.asia

Third-party code blocked the main thread for 920 ms
Cloudflare --> 771ms
Google Analytics --> 115ms
HubSpot --> 36ms

https://gmg.asia
obviously Cloudflare needs to work through www. so all traffic going to https://gmg.asia is then redirected to www

So i have a 1.41sec delay redirecting from
initial: https://gmg.asia
to
http://www.gmg.asia (is there anywhere on the Cloudflare panel to disable this?)
https://www.gmg.asia

and again, similarly
Third-party code blocked the main thread for 870 ms
Cloudflare --> 697ms
Google Analytics --> 124ms
HubSpot --> 53ms

==============================================

Any advice/solutions to this issue would be greatly appreciated!

Thanks

You are in a CNAME setup which means you aren’t really using Cloudfare for your DNS. Your root record is not proxied by Cloudflare and the redirection from your root record to www could be done in one step on the origin if your host supports it (or on Cloudflare directly if it was auth for DNS and the record was proxied).

1 Like

This is not correct. Because you’ve set up Cloudflare from Siteground, it’s the Siteground setup that’s forcing you to use www. If you set your site up through Cloudflare, you could still use your site without www.

The two resources I see from Cloudflare are the Browser Insights script and Rocket Loader. I use neither. Definitely turn off Browser Insights from the Speed tab. You already have Google Analytics. Turn that off for now and see if that helps. I leave it off because my JS loading is pretty well optimized anyway.

1 Like

Thank you @sdayman for your v prompt and detailed response.

And thanks for pointing out my incorrect perception of the www
So i assume the redirect issue is something i will have to take up with Cloudflare?
Or --can i reset my CNAME DNS settings in GoDaddy such that i have my original
CNAME www @
and given that my cloudflare CDN is set up already those are the only changes required?
(I’m not so sure if that it is as simple as that!)

I will try out the two points that you have mentioned and see what effect that will have.

Thanks again

1 Like

thank you @cscharff for your swift and technical explanation.

How would you best advise that i handle this?
Is there a FAQ on Cloudflare you could kindly direct me to?
or would i have to go to my host, SIteground to guide me through

(or even ugh - GoDaddy where the DNS record changes are made?)

Thanks again

1 Like

@sdayman @cscharff

Another thing i noticed - if you run the site through Google Page Insights my aforementioned Cloudflare issue

ie Third-party code blocked the main thread

The cloudflare (and HubSpot) seems to only show up for mobile and not for desktop.
[In fact my GTMetrix scores (for desktop) were improved as a result of enabling the CDN]

Why would that be the case?

Thanks

1 Like

maybe related to 🔥 CloudFlare Rocket Loader Disables It's Self On Page Speed Insights🔥

1 Like

thanks @eva2000 for pointing me to the thread, although i am not sure what i need to do with the info in the thread!

I can get rid of the Main Thread Blocking Time from Hubspot by removing the Javascript form from that particular page, but i have no idea how to tackle the high Cloudflare Main Thread Blocking thread of 988ms! (Beside completely deactivating the CDN …)

And i have Rocket Loader already implemented on the Cloudflare dashboard…

1 Like

the thread links to github issue tracker for lighthouse, it’s a bug on cloudflare’s end that rocket loader gets disabled when lighthouse user agent is detected so pagespeed insights metrics are poorer. The last reply in github issue tracker was from Cloudflare employee saying they’ll eventually fix it.

2 Likes

OK understood, but this would suggest one could have good mobile speeds but not have the score that reflects it on Lighthouse due to the bug on the cloudflare’s end

but what if the real-world experience (on mobile specifcally) actually does corroborate with the results --> ie it actually is slow loading up the page despite having the CDN enabled?

1 Like

that’s why Lighthouse has both field/origin real world + lab metrics (score is based on) - you shouldn’t just focus on lab metric individual score but your real world field/origin metrics

see my posts below

3 Likes

Thanks @eva2000

Will look into that!

1 Like

OK so based on the information to date:

Although our performance is actually not as dire as indicated by the Lighthouse speed tests, we would have to wait until Cloudflare fixes the bug for these test results to be more accurate.

But in the meantime, won’t this also affect our SEO scores and therefore our rankings?
(that is assuming that these test scores for performance are actually a good/reliable reflection on how well our sites are being ranked).

Thanks

Use other tools like webpagetest.org and webpagetest.org’s inbuilt google lighthouse tool to test. WPT has advanced options to make sure you use a real browser user agent instead of artificial user agent so Cloudflare rocketloader should work and give you the right metrics.

As to realworld/seo I believe it doesn’t affect it as Webmaster Console Speed Report uses Chrome User Experience report (CRuX) data and that is based on real world user agents and not custom user agents.

But you want to retest with/without rocket loader with other page speed tools too as rocket loader may not always give you better speeds.

1 Like

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