Subdomain URLs are showing 404 error when refreshed

The domain url which i had registered and bought was working fine , but the immediate pages or tabs like signup page or settings page is showing error when i try to refresh the page. But when i use the main domain url and from there its working just fine

@girish1274 It sounds like your site is a Single Page Application (SPA).

As per the warning in the documentation:
https://docs.netlify.com/configure-builds/javascript-spas/#app

Avoid 404s for SPAs

If your project is a single page app (SPA) that uses the history pushState method to get clean URLs, you must add a rewrite rule to serve the index.html file no matter what URL the browser requests.

You need to add a rewrite to your site, the instructions are here:
https://docs.netlify.com/routing/redirects/rewrites-proxies/#history-pushstate-and-single-page-apps

You can read more about it in the related Support Guide:
https://answers.netlify.com/t/support-guide-i-ve-deployed-my-site-but-i-still-see-page-not-found/125