WWW redirect for sub-domains

This is my package

$10/m Cloudflare Dedicated SSL with Hostnames

but it’s not working as expected like my current settings are below

*.example.com, example.com, *.www.example.com

and it’s working only for a domain but it’s not working on sub-domains like I have hundreds of sub-domains & want to www redirect for every sub-domain. like below:

www.sub.example.com www.sub1.example.com www.sub2.example.com www.sub3.example.com

What should I do now?

Much appreciate for help. Thanks

Due to how SSL works you can’t have hostnames like www.*.example.com, which is what you’re trying to do; your *.www.example.com doesn’t match those subdomains.

Your best bet here is to add each of those subdomains with www to your certificate as hostnames, so you’d add:

www.sub.example.com
www.sub1.example.com
www.sub2.example.com
www.sub3.example.com

instead of trying to use a wildcard.

1 Like

Exactly, following way isn’t acceptable as a hostname

www.*.example.com

Excuse me! Is there any way to using the wildcard without adding manual ways because I have mentioned in my topic like I have 100 or even above 100 of sob-domains and in that situation what should I do?

Thanks

@Judge

No, there is not a way since SSL itself doesn’t work that way. Either you can manually add domains and stop when you can’t add more, or you can choose to not have a www record for those subdomains and train your users to not type www when trying to go to your subdomains.

2 Likes