Redirecting *.domain.com to an error page

Hello, I have a Webapp which gives each customer a subdomain.
e.g.

  1. customer1.domain .com
  2. customer2.domain .com

I’m trying to redirect other subdomains to an error page (hosted on my servers) using the wildcard ( my SSL is set to Full (Strict)). but when I try to access any subdomain which is not in Cloudflare (so it gets redirected to the Wild-Card) I’m seeing this error (http://prntscr.com/ogtv89).

any ideas about How can I fix that?

Cloudflare does not proxy wildcard subdomains, so if you have a DNS entry here set to *, it’s not going to go through Cloudflare. It will send those requests right to your server. At that point, you’ll need to configure your server to handle such requests, typically through a Default Virtual Host.

This topic was automatically closed after 30 days. New replies are no longer allowed.