Remove www from subdomains

I read article in docs, and it says that Cloudflare Universal SSL certificate covering up to 1st level subdomains. So I tried on my example: https://www.subdomain.wynikilotowe.pl
And it works correctly only without www which is making is making this subdomain 2nd level. So I needed to remove www for subdomains and I added page redirect rule but it is not working and I don’t know why. Already checked similar cases on forum, but without success.

Rule config:

A records:

Does anyone know how to remove www definitely?
Thanks in advance.

Page rule not working to remove www from subdomains, example subdomain https://www.subdomain.wynikilotowe.pl

Rule:
www..wynikilotowe.pl/ Forwarding URL (Status Code: 301 - Permanent Redirect, Url: https://$1.wynikilotowe.pl/$2) How to fix it?

Thank you in advance.

This is a second-level subdomain so isn’t supported by Cloudflare’s Universal SSL (which would cover only wynikilotowe.pl and *.wynikilotowe.pl). You need to use an Advanced Certificate for this hostname…

Your Page Rule isn’t correct, but once you have the SSL certificate in place, or make other arrangements, post back and we can continue with that.

1 Like

Thanks for your comment.
I am aware of this from this lecture:
Fix VERSION_OR_CIPHER_MISMATCH · Cloudflare SSL/TLS docs,

But instead of using advanced certificate I prefer to remove www from subdomains permanently so Universal SSL should work… Universal certificate is already in place and it work with https://subdomain.wynikilotowe.pl
I believe the key is to remove www from subdomains. Still not sure how to fix this rule, already base in thi article:

In order to use rules at Cloudflare, the names would neeed to have valid certificates, which means that you cannot use Cloudflare to fix the problem without using ACM.

If you prefer not to purchase ACM, you could simply delete the hostnames that are too deep instead.

1 Like

Thank you for you help.
I was hoping that active this rule will make all subdomains working with SSL, but as I understand this address with www should already have certificate - without this page rule is disabled.

I must add that my subdomains is not the real subdomains in fact. It is virtual subdomains like wildcard, all * request is going through the one main application. Those subdomains are only names in DB. There are no any config on the server dedicated to subdomains. Sorry for my newbie behaviour but still not sure after lecture from the link how to deleting hostnames ( from A records?) and how can this will work after.

If the second level subdomain is caused by a wildcard record, you need to delete the wildcard record.

1 Like

I deleted www A records but still the same or should I wait for longer time?
This www I am adding manualy to the address in webbrowser for test.
Currently only two A records are wynikilotowe.pl and *

You still have some record in place that is resolving www.subdomain.wynikilotowe.pl. While I would not expect a wildcard record to answer more than one label deep, something in your zone is answering queries for any depth of subdomain. You may need to delete that wildcard record record to identify whether it is responsible.

1 Like


Sure I can try it, already delete * record, current state on the screen, but it’s mystery to me, after change this http://subdomain.wynikilotowe.pl/ stopped working. Many thanks for you patience :slight_smile:

1 Like

Have you added the record for just the subdomain that you need?

1 Like

You’re right, it should be added after * removed. So now back to the previous state this subdomain with www returning error only type is change - DNS_PROBE_FINISHED_NXDOMAIN. I don’t wanna waste your time, many thanks for suggestions.

1 Like

Ok, DNS_PROBE_FINISHED_NXDOMAIN showing because www record is deleted. When I add www then cert error appears. As I understand it, it is impossible to achieve www removal without Advanced Certificate in Cloudflare.

  1. If I buy it is it working for all in auto mode as wild card? There is no need to add each subdomain separately? In fact I don’t have a real subdomains, all are directed to main folder with wildcard mode (*). Currently there are ~300 virtual subdomains.

  2. If I add Advanced Certificate for 1 domain, can I change after test to different domain? I mean I could test it with test domain, and if works properly switch to the real website.

  3. Is it possible to buy a Cloudflare support help to make it work in the panel? I mean that someone from support team do all needed config in the panel, it could be better than dig it for the next few days by a newbie like me…

Removing the record to prevent www.sub.example.com from resolving was the desired outcome. You don’t need to remove the www when you make it not exist in the first place.

If you want the hostname to work if someone erroneously prepends www then you will need to have voth a DNS record and ACM.

I prefer to have the unnecessary name simply not exist. I would just keep the record as nonexistent and don’t publish any links with www in front of your subdomains.

You can decide which approach works best for you.

As for your questions:

  1. I don’t know. I have never attempted such a configuration.
  2. You cannot change a certificate, but I don’t know if that is what you really want to know. The pricing is not per certificate.
  3. Cloudflare staff are not able to configure customer settings.
1 Like

Thank you again :slight_smile:
I will not use www for subdomains anymore, but I was in the past and currently Google “remembered” all those addresses with ‘www’. So if I leave it like this, without any redirections, users will see certificate errors.

> If you want the hostname to work if someone erroneously prepends www then you will need to have voth a DNS record and ACM.
It means that for all 300 virtual subdomains should be created DNS and ACM seperately? Not sure if Cloudflare allowed for so many, there is a limit probably.

> You cannot change a certificate, but I don’t know if that is what you really want to know. The pricing is not per certificate.
As I see in the pricing plan Free I can buy Advanced Certificate Manager for $10/zone/mo - so the zone means 1 domain I guess, correct? If I understood you correctly I can buy 1 ACM for month and test it, so if test is succesfull, just drop this ACM, buy another one and adjust to the real domain.

1 Like

If you are looking to test on another domain first, the plan you described sounds sensible to me.

1 Like

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