How to make subdomain redirect to the domain?

Hello there am new at Cloudflare I just want to ask questions about the sub domain
That I want is
If I put invalid subdomain
I would like it to redirect to my main domain
Something like that
Can someone please helping me with this please?

Not good practice at all.

If someone target some, all the bad requests and traffic would redirect to your main domain name and your Website might become inaccessible.

May I ask if there is some special reason for, or? :thinking:

If you want to achieve it, make sure to add a new DNS record, select A type, enter the hostname and for the IP address enter therefrom make sure it’s proxied :orange: .

Using Page Rules for example, you can do it by following the steps from the tutorial below:

1 Like

Yeah my reason for doing this because I am making like some shop website for rent I think it better than said like domain not found so I want to try to do this

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