Deleted Subdirectory still Online?
I am using Cloudflare to host my domain, and GitHub to host my html.
I deleted a file in GitHub, because I wanted that subdirectory of the website to be deleted, but when I go to
mydomain.com/subdirectory it still displays the html which was in the now-deleted file.
Clearing cache didn’t work
13 Replies
Pages has an asset retention cache built in: https://developers.cloudflare.com/pages/configuration/serving-pages/#asset-retention
We will insert assets into the cache on a per-data center basis. Assets have a time-to-live (TTL) of one week but can also disappear at any time. If you do a new deploy, the assets could exist in that data center up to one week.
Cloudflare Docs
Serving Pages · Cloudflare Pages docs
Cloudflare Pages includes a number of defaults for serving your Pages sites. This page details some of those decisions, so you can understand how …
By Github do you mean Github Pages, or Cloudflare Pages, would have been a question to ask first actually
Honestly I’m not sure,
I went to workers & pages (on cloudflare) and my github repository is there, if that answers your question
in the dns records for
mydomain.com
is there a CNAME to <something>.pages.dev, or something else?yeah it goes to pages.dev
you're using Cloudflare Pages then, and the reason is what I described above, assuming you truly did delete the page and the build succeeded
i see, is there a way to remove the subdirectory without waiting a week?
well a week is just at worst -- if it's not requested it'll be evicted before then, and even then the cache is per data center and not global.
If you just wanted to force it instantly away, the easiest way would probably be a bulk redirect/redirect rule/page rule redirect to your home page
i just found a thing that says clear cache under
workers>mydomain>settings>builds & deployment
just build cache
would clearing this cache fix the problem? and if so, would it cause other problems? sorry again for my general ignorance
no worries, it's a bit confusing/hidden. The cache you see there is just the build cache for the build environment. Pages can cache specific packages/framework files if enabled, and that's the button to clear it
the asset retention cache lives on the project's pages.dev, no provided way for you to clear it sadly
ah, okay. thank you so much for your help! :)