Custom domain slower than netlify subdomain

Hello,

I’ve been using Lighthouse to analyze the performance of my website and I noticed that the netlify subdomain is on average 450ms faster than my custom domain ( looking at firstContentfulPaint ).

Did I do something wrong? Or is there something I could to in order to have the custom domain as fast as the netlify one?

I would really appreciate it if you could have a look at my setup.

Cheers,
Zinc

My netlify subdomain: awesome-shannon-275212.netlify.app
My custom domain: ecsspert.com

Here is the dump from Lighthouse:

[
{
url: ‘https:// awesome-shannon-275212.netlify .app/’,
finalUrl: ‘https:// awesome-shannon-275212.netlify .app/’,
lighthouseScore: 1,
accessibilityScore: 1,
firstContentfulPaint: 929.5550000000001,
firstMeaningfulPaint: 929.5550000000001,
speedIndex: 1325.210149971962,
diagnostics: {
numRequests: 2,
numScripts: 1,
numStylesheets: 0,
numFonts: 0,
numTasks: 90,
numTasksOver10ms: 1,
numTasksOver25ms: 1,
numTasksOver50ms: 1,
numTasksOver100ms: 0,
numTasksOver500ms: 0,
rtt: 171.26799999999997,
throughput: 11202537.392609084,
maxRtt: 171.26799999999997,
maxServerLatency: 8.555000000000064,
totalByteWeight: 6181,
totalTaskTime: 110.721,
mainDocumentTransferSize: 2969
},
rank: 1,
performanceRank: 1,
accessibilityRank: 3,
axe: { passes: 65, violations: 1 }
},
{
url: ‘https:// ecsspert .com/’,
finalUrl: ‘https:// ecsspert .com/’,
lighthouseScore: 1,
accessibilityScore: 1,
firstContentfulPaint: 1393.505,
firstMeaningfulPaint: 1393.505,
speedIndex: 1808.0902500183583,
diagnostics: {
numRequests: 4,
numScripts: 1,
numStylesheets: 0,
numFonts: 0,
numTasks: 115,
numTasksOver10ms: 1,
numTasksOver25ms: 1,
numTasksOver50ms: 1,
numTasksOver100ms: 0,
numTasksOver500ms: 0,
rtt: 12.131,
throughput: 10424902.677192906,
maxRtt: 167.541,
maxServerLatency: 7.275000000000034,
totalByteWeight: 6698,
totalTaskTime: 123.90000000000005,
mainDocumentTransferSize: 2938
},
rank: 2,
performanceRank: 2,
accessibilityRank: 1,
axe: { passes: 65, violations: 1 }
},
{
url: ‘https:// www.ecsspert .com/’,
finalUrl: ‘https:// ecsspert .com/’,
lighthouseScore: 1,
accessibilityScore: 1,
firstContentfulPaint: 1534.362,
firstMeaningfulPaint: 1534.362,
speedIndex: 1937.0385000243664,
diagnostics: {
numRequests: 5,
numScripts: 1,
numStylesheets: 0,
numFonts: 0,
numTasks: 113,
numTasksOver10ms: 1,
numTasksOver25ms: 1,
numTasksOver50ms: 1,
numTasksOver100ms: 0,
numTasksOver500ms: 0,
rtt: 165.08499999999998,
throughput: 16942480.930529207,
maxRtt: 165.08499999999998,
maxServerLatency: 4.362000000000023,
totalByteWeight: 6286,
totalTaskTime: 130.28,
mainDocumentTransferSize: 2783
},
rank: 3,
performanceRank: 3,
axe: { passes: 65, violations: 1 },
accessibilityRank: 2
}
]

@zinc I’m seeing a slight difference, too.

To which domain names is your Google Analytics code tied? In other words, is it possible that your page is trying to load Google Analytics for a site (ecsspert.com) that is not registered to that GA code?

Also, GTMetrix reports that www.ecsspert.com has landing page redirects, which neither your apex domain nor the Netlify subdomain has.

The GA tracking was set for http://www.ecsspert.com I set it now to https.

I had a look at GTmetrix using https://ecsspert.com and https://www.ecsspert.com and they have no landing page redirects and both have a page speed score of 100.

I also tried GTmetrix with http://www.ecsspert.com and then I do get redirects.

What do you make of all of this?

Zinc

Also on godaddy, I just have the netlify DNS records.

Indeed there was a difference where GA was not called on the netlify subdomain. I removed that and made sure both sites are exactly the same. Still I have a difference of 500 in firstContentfulPaint…

I’d suggest testing just https - Netlify will always redirect for http, but repeat visitors will start out on https saving the redirect :).

Our staff can’t really “support” what performance testing tools say - you can ask their author for help with that. If you have some specific slow request that you’d like advice on, we can help with that - please make sure you include the x-nf-request-id value for such a request, as described here: [Support Guide] Netlify Support asked for the 'x-nf-request-id' header? What is it and how do I find it?