Why is my Netlify default subdomain (e.g. hungry-bob-55512.netlify.app) performing better and faster than my primary domain (e.g. www.mydomain.com)?

Hello Netlify! Thanks so much for your support.

My Netlify subdomain (focused-wright-67af61.netlify.app) is performing much better, faster, and more reliably than my primary domain (https://www.placeflow.net/), which I’ve added to my Netlify site via the Netlify UI.

In particular:

  • The subdomain is much faster
  • The primary domain is often unavailable (long page load time, which eventually fails, with a server not found error).

Is there any way that I can fix this, so that my primary domain performs just as well as my Netlify subdomain? For context, on my DNS, placeflow.net has its nameservers pointed to Cloudfare — and on Cloudfare, placeflow.net is pointed to Netlify (with SSL/TLS encryption mode set to Flexible.)

Thank you!

-Sam

You’re proxying on Cloudflare? (www.placeflow.net has the orange cloud icon?), don’t proxy requests trough Cloudflare, make sure the icon is gray.

Netlify is a CDN, Cloudflare is a CDN. Using a CDN on top of a CDN is obviously pointless :stuck_out_tongue:

FYI; your website is generally slow for me.

Domain:

Subdomain:

One is the subdomain, the other your domain. Pretty much spot on the same.

1 Like

Thanks so much Freddy, for taking a look and the feedback!

  1. The proxy status on Cloudfare is grey cloud with “DNS only.” Is that okay? Or would it be more sensible to go straight from domain provider to Netlify?

  2. Do you have any advice for improving the performance in general — in the context of different Netlify settings/configs, for example? (Or any other issues you might have encountered?)

Huge thanks again!

Sorry; I thought you might have the orange cloud enabled as you mentioned that you had set SSL in Cloudflare to “Flexible”, this setting only applies for requests proxied through CloudFlare (Aka orange icons). If you don’t have an orange icon next to your records, then you’re not using Cloudflare as anything else then a DNS provider.

I use cloudflare myself, and can’t exactly say that I have any issues, tho I have reported before that Netlify feels quite slow, quite often. I’m not sure if it’s Netlify in itself, Cloudflare or similar, but netlify’s speeds seems to vary drastically.

I’ve read, multiple times, that CNAME usage is not recommended for custom domains, and Netlify recommends that you point the domain directly to Netlify using their nameservers; if this actually changes anything, I couldn’t say, I havn’t tried. I use most of my domains for multiple things, and Netlify’s DNS is a bit limited compared to Cloudflare, to put it kindly :stuck_out_tongue: Tho, they recommend it, so might be worth a shot?

It’s hard to say exactly what the problem is, I experience it myself, and it seems to vary quite a bit. I get an instinct feeling that the more I update my website, the more I build, the slower the website feels, maybe Netlify is slow at sharing the site across the CDN network? I wouldn’t know.

As you can see, then your TTFB is quite slow (Time to first byte), which is represented by green. Blue indicates download time, where most of it is quite fast, except your semi-large jpeg image. Most of the loading time is actually the browser waiting for a response from Netlify.

This below, is an example from one of my sites hosted on Netlify, and I spent quite a lot of time optimizing my code.

As you can see, then my TTFB is quite high as well, tho, not for every request. On a general notice, I feel that Netlify is slow; but it’s free, so I can’t complain. The day I pay for Netlify I would expect a much higher level of response time and speeds. Which is another confusing topic, as some staff member, perhaps a veteran, mentioned that there is no difference in the nodes between free users and paying users, even tho they specifically advertise “High end speeds” as one of the perks for buying a subscription. So not sure what to believe here.

I’ve chunked it all down to “it’s free”, and because it’s free, and because I wouldn’t accept these response times for anything I take seriously, then I’ve spent a minimal amount of time, next to none, trying to figure out what it is or what’s causing it. It’s literally not my problem, but Netlify’s :stuck_out_tongue:

Sorry; not really sure how this suddenly became an essay of absolutely nothing useful at all :confused:

@sbutler-gh Welcome to the Netlify community.

You seem still to be using the old IP address for the Netlify load balancer:

|====================== dig A record(s) for =====================
| ------------------------ placeflow.net ------------------------
| ---------- Netlify's old load balancer: 104.198.14.52 ---------
| ------------ Netlify's new load balancer: 75.2.60.5 -----------
104.198.14.52
Organization:   Google LLC (GOOGL-2)

See the documentation here:
https://docs.netlify.com/domains-https/custom-domains/configure-external-dns/
|================================================================

What happens when you update that setting?

Am I confused here? His domain is www., not the apex.

Which is a cname, not an A record?

When using external DNS, the best practice is to have the A record pointing at the Netlify load balancer IP address and the CNAME record for the www subdomain pointing at the Netlify subdomain.

Hi @freddy

I would say that setting up a domain in Netlify DNS does make the site perform faster. I did this yesterday with a domain and found page load speed much quicker than previously.

So, I identified one MAJOR issue … I hadn’t updated my CNAME record in Cloudfare, from an older Netlify site for an earlier version (placeflow.netlify.app) to the new Netlify site for the current version (https://focused-wright-67af61.netlify.app/)

So basically, the Cloudfare DNS had placeflow.net pointing to a wrong CNAME.

Sorry for the doh on that. When I was updating my placeflow.net DNS from the first site to the second in the Netlify UI, I couldn’t remember if there were any other settings I needed to fix.

On a feature note — perhaps that could be helpful in the product:

When a user adds a domain, currently pointed to Netlify, to a new Netlify site

Alert the user to update the CNAME for the new Netlify site

Hopefully this will speed things up, look forward to seeing how it goes. Thank you all so much for the help so far.

Also, this is a really helpful discussion on performance in general in Netlify. Would love to hear more thoughts on that, regarding difference between Netlify DNS and Cloudfare, free settings vs paid settings, etc. Is there any documentation that goes into that kind of discussion?

Hi @gregraven, see my response above (my CNAME oversight). Sorry for that.

In any case, much appreciate the tip for updating the load balancer. Since I updated the CNAME and the A record (to new load balancer) at the same time, I’m not sure if I can do an isolated test to see about any performance gains for pointing to the new load balancer. But if there’s any way I could share insights about that, I’m glad to – just let me know

Hi, @sbutler-gh.

I tried looking at the subdomain under netlify.app but that site no longer exists:

$ curl -svo /dev/null https://focused-wright-67af61.netlify.app/  2>&1 | egrep '^< '
< HTTP/2 404
< content-length: 0
< server: Netlify
< age: 0
< x-nf-request-id: 9aa70a02-ff5d-43c0-a614-b3c5bd280724
< date: Mon, 24 May 2021 05:47:52 GMT
<

If you are still seeing performance differences between the domains, it would help to make some documentation of the performance and share it with us to we can see what you see. Making a HAR file recording is one example of creating such documentation.

Whatever documentation you do provide, the best thing you can send us is the x-nf-request-id response headers (or the information they replace) so we can be sure we are examining the same HTTP responses you are reporting.

If you make a HAR file recording, these the x-nf-request-id headers will be included by default.

If there are other questions or if the issue still persists, please let us know.

Hi @luke, thanks so much.

To clarify, after the discussion above, I changed the netlify subdomain to placeflowapp.netlify.app (making it closer to the actual domain name.)

I’m still encountering inconsistencies between the Netlify subdomain and the pointed domain (placeflow.net)

When my page (placeflow.net) fully loads, it often loads comparably to placeflowapp.netlify.app. However, the loading for the entire placeflow.net page often fails — while placeflowapp.netlify.app continues working without a hitch.

Here is a video documenting this common occurrence — note that an HAR recording doesn’t even start, because the domain’s page load fails, while the subdomain instantly loads without a problem:

For good measure, here are my DNS settings, in case anything is misconfigured there:

Any further thoughts / guidance?

@sbutler-gh Have you tried delegating DNS directly to Netlify rather than passing it through Cloudflare? What about using NameCheap DNS? Tests such as these might help pinpoint the source of the slow-down.

Hi @gregraven, thanks for the advice and follow-up.

Delegating DNS directly to Netlify seems to be a good solution. Thank you again!

1 Like