ยฉ 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developersโ€ข2y agoโ€ข
4 replies
chelminski

404 redirect for subdomains

I would like to configure the following feature: in case of a subdomain that does not exist, cloudflare redirects the user to the main page. I have configured a redirect rule to exclude all existing domains. So:

Redirect to page: astoria.studio if:
- Address is not api subdomain
- Address is not download subdomain
... etc.

Unfortunately, this doesn't work. If you type e.g.
- kjwevhfouqwb.astoria.studio,
- blablabla.astoria.studio,

the user is NOT redirected to the home page.

How to configure this feature?
image.png
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Subdomains
Cloudflare DevelopersCDCloudflare Developers / general-help
2y ago
Redirect Rule Not Working (Domain, Proxy, without effecting Subdomains)
Cloudflare DevelopersCDCloudflare Developers / general-help
2y ago
All subdomains on a domain redirect to one server?
Cloudflare DevelopersCDCloudflare Developers / general-help
3y ago
SSL for virtual subdomains wildcard
Cloudflare DevelopersCDCloudflare Developers / general-help
2y ago