Added new site using old url, and Netlify display old website (continuous deployment)

I’m having an issue with deployment of my static website deployed on GitHub. It looks like when I google for my website, it shows my old website, but it should show my new added website. My Netlify site name is https://aneta.netlify.app/ I don’t have custom domain.
In the past, I was using the same URL with an old website, but I have deleted the old website in my dashboard. Then, I have added my new site, and edited default URL and changed it to my old URL website.

Note: I found this issue, when testing on external devices. On my computer, google display the website I have added (the right one!), but on my friend’s smartphone it shows the old website.

Below you’ll find build log & & build settings file.

Build log
9:38:23 AM: Build ready to start
9:38:24 AM: build-image version: d7b3dbfb0846505993c9a131894d1858074c90b4 (focal)
9:38:24 AM: build-image tag: v4.10.1
9:38:24 AM: buildbot version: 2009834004fbab70d95494495d61f0ada38da28b
9:38:25 AM: Fetching cached dependencies
9:38:25 AM: Starting to download cache of 61.3MB
9:38:25 AM: Finished downloading cache in 882.436924ms
9:38:25 AM: Starting to extract cache
9:38:25 AM: Finished extracting cache in 65.104172ms
9:38:25 AM: Finished fetching cache in 992.014709ms
9:38:25 AM: Starting to prepare the repo for build
9:38:26 AM: Preparing Git Reference refs/heads/main
9:38:27 AM: Parsing package.json dependencies
9:38:28 AM: No build steps found, continuing to publishing
9:38:28 AM: Starting to deploy site from ‘/’
9:38:28 AM: Creating deploy tree
9:38:28 AM: Creating deploy upload records
9:38:28 AM: 6 new files to upload
9:38:28 AM: 0 new functions to upload
9:38:28 AM: Starting post processing
9:38:28 AM: Post processing - HTML
9:38:28 AM: Post processing - header rules
9:38:29 AM: Post processing - redirect rules
9:38:29 AM: Uploading Cache of size 64.3MB
9:38:29 AM: Post processing done
9:38:29 AM: Finished processing build request in 4.909252373s
9:38:32 AM: Site is live :sparkles:

Hey @aneta-s

When you say Google is displaying the correct site, you mean in the search results it displays text from the old site, or do you mean Google Chrome?

If different devices are displaying different content (or different browsers on the same device), it is highly possibly the old content is cached on the device. Clearing the device/browser cache, hard refreshing, etc. should help remedy this.

It would also help if you could provide screenshots of the content you should see versus the content you are seeing. (For what it is worth, I see the same content on desktop and mobile.)

Failing this, a request ID for content that is incorrect will help Netlify determine if there is any possibility of a cache issue on the CDN.

I mean in the search results it displays text of the old site. It was Google Chrome browser.

I’ll ask my friend to clean the caches. The new site is from a few months ago. Does it mean that the surfers online will always see old content, if they won’t clean their caches?

This is the content I should see

Versus the content I’m seeing

This is the same as what I am seeing

This is the information, I found in the Response tab via devtools. As far I can see is Gatsby, webpack etc…things from my old website, I have deleted months ago. Can you find here something what might resolve the issue?

This is the right page. Do you clean the cache by yourself, or is it something the internet do it for you? For example, this is my portfolio and I don’t know which recruiter has cleaned her cache :slight_smile: Is there a solution to make sure that my website sends the right data to the visitor?

Without asking people individually, there is no way to know what content they are seeing. Given the default cache control set by Netlify, there is little chance old content is served.

Did the old site use a service worker? If so, this may cause issues. Check out

I’m glad Netlify does this, so my visitors don’t have to wait to load the new content. How long it takes until Netlify set the cache control?

Thank you so much for the solution. The service worker on this computer was turned on. Is there a way to unregister service workers for every computer? We removed our framework and now use only vanilla code. So my new site does not use service workers for months already, because :slight_smile:

Not having ever had the need to use a service worker (and thus not needing to unregister one) my only suggestion is to add the script snippet in the aforementioned guide to your site and to read the link to Stack Overflow in the reply post on said guide.

Again, I can only speculate. Others with more experience with service workers may provide other/better advice/solutions.

Thanks for the tip. I tried these things already, but yesterday we found a new computer with the same issue.
My new website does not use service workers or any packages, webpacks etc. For some reason Netlify gives this as the output to the browser on some computers. This website is completly different, I removed to the old website. Is it possible to remove it from your bin database?

The problem is not with the new website, but with the old one - if I recall, a lot of Gatsby templates using a plugin called gatsby-plugin-offline which would automatically install a service worker. Now anyone who had visited your old site in the past - would have that service worker installed and thus, won’t be able to load the new site.

The only solution in this case would be to use a different domain name. If you ask your users to load: https://6310773bca31fc0009c44040--aneta.netlify.app/, does it load fine? If yes, Netlify is serving the correct content, and my above assertion is true.

1 Like

Thank you for your reply. I’ll try with another domain. Thanks again for your time