No real subdomains on my web automatic redirect to www o @ domain

What is the name of the domain?

What is the error number?

Nothing error

What is the issue you’re encountering

Nothing

What steps have you taken to resolve the issue?

Example Cloudflare yes me put maximo.cloudfare.com or not real subdomain,automatics redirect to www.cloudfare.com

What feature, service or problem is this related to?

I don’t know

What are the steps to reproduce the issue?

all randoms combinations of subdomains is redirected to www.cloudfare.com how do this

Looks like you’re having an apex * (wildcard) DNS record (hostname) under the DNS tab of your zone at Cloudflare dashboard? :thinking:

Otherwise, blabla.dujemassei.com doesn’t open, meaning there isn’t? :thinking:

May I ask what are you trying to achieve here? TO redirect non-existing sub-domains to main domain? That’s not smart move due to possibly missuse and abuse of your domain and generating unneeded Web traffic, possibly generating CPU load and having higher utilization to execute such HTTP (or other) requests (not to mention DDoS, etc.).

My website has everything done in Cloudflare domain and Cloudflare pages. In addition, I have all the security options activated and it has not failed me in more or less 4 months. It has more than 2,000 active hours and more than 90,000 attacks. What I want to replicate is the Cloudflare system that non-existent subdomains that do not have a dns, I mean, if you enter anything, it redirects you to the main page, like a 404, but for subdomains, I think it is not in the free plan, but I don’t think it consumes anything to have it like that, I mean. I think it is done with the Cloudflare rules with a configuration. I don’t think it is that difficult.

You can achieve this with Redirect Rules by filtering on https://*.example.com, however you will need to explicitly exclude existing subdomains from your wildcard rule, otherwise your redirect rule will always take precedence even for subdomains that shouldn’t be redirected.

Alternatively, you could do something more creative like pointing your wildcard DNS entry to a discard prefix (100:: for IPv6 AAAA records or 192.0.2.0 for IPv4 A records) and then use Snippets to always redirect on 522 status code (connection timed out). This way you don’t have to update your redirect rule filter expression when you need to add another subdomain that doesn’t require redirection. Here is an example for inspiration to get you started.

You can achieve this with Redirect Rules by filtering on https://*.example.com, however you will need to explicitly exclude existing subdomains from your wildcard rule, otherwise your redirect rule will always take precedence even for subdomains that shouldn’t be redirected.

Alternatively, you could do something more creative like pointing your wildcard DNS entry to a discard prefix (100:: for IPv6 AAAA records or 192.0.2.0 for IPv4 A records) and then use Snippets to always redirect on 522 status code (connection timed out). This way you don’t have to update your redirect rule filter expression when you need to add another subdomain that doesn’t require redirection. Here is an example for inspiration to get you started.

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