Subdomain + cloudflare + https - how do I fix it?

Started by wwwmaster@, Sep 26, 2022, 12:11 PM

Previous topic - Next topic

wwwmaster@Topic starter

Hello!
Help advice, I can not find an answer.
I use cloudflare and their free ssl certificate (in the security settings I have SSL: Flexible).

Example:
https://mydomen.net/ - site works, ssl is there
https://www.mydomen.net/ - site is up, ssl is up.
==== - everything is ok here. no bugs.

But if I want to create a subdomain
https://test.mydomen.net/ - site works, ssl is there.
https://www.test.mydomen.net/ - site is NOT working, "Error when establishing a secure connection".
* added test and www.test in the dns settings
**http://www.test.mydomen.net/ - site works (without ssl, of course)

If you disable ssl (SSL: Off)
http://www.test.mydomen.net/ - site works (without ssl, of course)
If you open https://www.test.mydomen.net/ - same error (Error during secure connection).

My question is: for some reason ssl certificate on www.test doesn't work. (and on any subdomain)

How to fix it?
Or how can I automatically redirect from https://www.test.mydomen.net/ to https://test.mydomen.net/ with cloudflare?
  •  

-DM-

I think that on the subdomains, and domains need to glue 301 on the main mirror to do - because the opening with a www and without and so on - not good.

:) One option should be, comprende? - That is, choose, with or without a www and so on.

All very, very imho.
  •  

wwwmaster@Topic starter

#2
-DM- , I do not understand you.
To make a redirect (gluing) - you need to make the version with the www subdomain work. And I, as I wrote above, does not work. That's why I created this topic.
  •  

-DM-

Quote from: wwwmaster@ on Sep 26, 2022, 02:10 PMI do not understand you.
I don't understand you - you can redirect from any url related to a domain.
For example, to sift out the most insane user inputs and direct them to the main one...
However, you know better.
  •  

wwwmaster@Topic starter

I'll ask again then.
How do I make a 301 redirect from https://www.test.mydomen.net/ to https://test.mydomen.net/ via cloud? What, and where do I have to write it on the server?
  •  

Term

Https via cloudflare is a self-deception and a surrogate, I think. Better to make a normal certificate on the server, the same Lets Encrypt has long existed.
And the www has long been unnecessary.
  •  

-DM-

Did you write to technical support, read FAQ and other cloudflare stuff?
Unfortunately, I can not give you any tips.
I highly recommend reading the relevant sections on cloudflare Dashboard and Help.
There are all the answers to your questions. And the solution.

Quote from: Term on Sep 27, 2022, 06:33 AMthe same Lets Encrypt has long existed.
Everything is already provided for, it's already given a certificate with auto-renewal, for domains and subdomains, plus a backup certificate, why the extra movement every three months?
They will also fix mixed content, and HSTS will organize.  ;)
  •