404 is not working properly

I’ve built a website using Nuxt and Cloudflare Pages.
404 does not seem to work properly.

The 404 file is created in /pages/404.vue, and when I run yarn nuxt generate,
the 404.html is also output under the dist folder.

When I accessed a non-existent URL in a domain ending with pages.dev, of course I got a 404.
However, when I accessed it from a custom domain, strangely enough, the 404 page was not displayed.

Strictly speaking, the 404 page would appear the moment I accessed it, but it would disappear immediately.
I checked the developer tools to see if the file was being retrieved, and apparently it was.
However, everything under the _layout disappeared the moment I accessed it.

Is this a mistake, or a bug?

(Translated with DeepL)

Hey,

I’m not sure I understand exactly what’s happening. Could you please share your domain so we can see what happens?

2 Likes

Thank you for your reply.

The domain is as follows
kr-tukimi.pages.dev
kr-tukimi .com

The non-existent pages are as follows
kr-tukimi.pages.dev/hogehoge
kr-tukimi .com/hogehoge

404 pages that need to be displayed are as follows
kr-tukimi.pages.dev/404
kr-tukimi .com/404

(Translate by DeepL)

I created another project with the same content, but
It worked fine with the same domain ending in .pages.dev, but
It didn’t work correctly on my own domain.

(Translate by DeepL.)