Debugging slow loading time on root domain setup with A record

We have a SPA setup with the following _redirects file:

/*   /index.html   200

With DNS hosted at Amazon S53 with the rules:

A: * =>
CNAME: develop =>

Note that I am using and, but of cause that is not really our domain.


But we are seeing really slow loading times for assets like images when loading from Europe. We see TTFB in the range of 2-5 sec for small images.


The TTFB seems to vary a lot from request to request but it is consistently performing good on (using CNAME record) and worse on (using A record).

I can see in the forum that we are not the only ones experiencing this. What information do you need from us to better debug this?

Thanks a lot.

Hi, @eeit, and welcome to our Netlify community site. :+1:

Here is the issue:

  • the apex domain is (probably) set to primary
  • an A record is being used for the apex domain

If you do these two things (use an A record for the apex set it as primary) you will completely miss out on our global CDN.

The IP address is in (or near) San Francisco.

If you do use the A record method for the apex domain (like, then we recommend that you set a subdomain (like as the primary domain for the site.

We do not recommend using the apex domain as the primary domain for the site. Subdomains will use a CNAME record, not an A name.

The CNAME records for the subdomains will be redirected to the IP address of the closest CDN node - closest to the source IP address making the DNS query. So, someone in Paris will be sent to a CDN node in Frankfurt not San Francisco which will likely be a much faster connection.

If you make an A record for the apex/root domain then please make a subdomain the primary domain for the site (and do not set the apex as primary).

If you do set the apex as primary with an A record for CDN all global traffic is sent to a single CDN node near San Francisco and the rest of our global CDN nodes will be ignored.

Please let us know if there are other questions we can answer about this.

1 Like

Hi @luke

Thanks for the detailed answer.

I can see from your 2017 guide To WWW or not WWW that you clearly recommend using the subdomain as the canonical domain and that a CNAME record is set up for this subdomain pointing towards the Netlify site

Am I correct that we still need an A record for the apex domain pointing to your San Francisco IP address which will respond with an HTTP 301 redirect to if the two domains have been configured in the Netlify system?


Yes, if you are configuring a primary custom domain, both the www subdomain and the apex domain will need to be configured as you described – a CNAME for your www subdomain pointing to and an A record for your apex domain pointing to