Site Pages in production only are Loading Twice causing flicker - Gatsby - but not on Deploy Preview

This is for sitename:

This is a production only bug. We have deploy previews set up on our branches before merging to main and this never happens on the deploy preview, only after publishing to production build.

When navigating to other pages on the site from main navigation, each page is loaded twice. This also happens when going to a give page directly via the url

For instance:


compare to deploy preview:

Is there some setting we are missing?

I’m stuck here, please help!

Hi Michael, thanks for reaching out! I did notice a slight flicker when initially accessing the URL, but I’m no longer able to replicate the behavior :thinking:

Is this happening consistently on your end? If you preserve the network requests in your browser console for example and navigate the site, do you see the same assets being loaded twice?

Can you also confirm whether you have any AB testing tools like Optimizely configured on your Gatsby site, as sometimes these can cause similar flickering behavior. Looking forward to hearing from you!

Thank you Marcus!

I’ve been trying to deploy changes to headers, navigation urls, etc, purging Netlify cache, trying to debug.

I have only really been seeing this on Chrome on MacOS, on Linux, Android, and iPhone.

When I have preserved logs, I see the double navigation logged.
Screenshot from 2024-01-09 16-40-05

All the network requests are duplicated: (4.7 MB)

We do not have any A/B testing on this site.

One thing I just noticed, it happens only on the Domain site, not when hitting at the netlify sitename

Hi Michael,

Thanks for following up, and thank you for that additional context! I’m seeing the same thing on my end for the custom domain as well, but I just took a look at the DNS settings there, and it looks like the subdomain at isn’t currently managed by Netlify.

Can you confirm and provide any additional context into where that domain is hosted? Investigating the config there will likely be the best next step for getting this squared away. Thanks again!

1 Like

Thank you @marcus.little for your continued help!

The Client owns the domain and its managed by their AWS account, which I don’t have access to.

I would have to coordinate with them as it comes to updating DNS settings and other records. What do you think we should do?

What type of information should I get from them to help diagnose?


Thanks for following up and confirming! That the issue isn’t occurring on the Netlify app domain but only the domain hosted on AWS suggests that this issue likely isn’t being caused by anything in your Netlify configuration, but rather the setup at AWS.

Optimally, you would configure your external domain at Netlify or use Netlify DNS, which would provide you and us more visibility into these kinds of issues.

We unfortunately don’t have a ton of ability to diagnose issues that are specific to external hosting providers, but assuming your client wants to keep the domain managed at AWS, the next best steps might be for them to contact AWS support to ensure the domains are configured according to best practices. Thanks again!