Redirect all subdomains that are not used to main page

Is there a way to use dns or a page rule to have all subdomains that are not already configured to do something, to redirect to the main page?

You can create a wildcard DNS record (name: *.example.com), but you’ll still have to point those to a web server (A/AAAA, or CNAME to an existing record such as example.com or www.example.com) that does the actual redirect (you can use a Page Rule for that).

I have done this, but it overrides the 2 subdomains I have.

You’d still have to start some sort of wildcard record janik1 recommended. When I want one that I’ll use for Redirects, I’d create an AAAA record that points to 100::, which is a valid placeholder.

Rules aren’t going to know which domains aren’t being used. You’d have to create a Redirect Rule with a hostname IS NOT IN, and add the hostnames you don’t want redirected.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.