Unable to visit domain with prefix

Hi,

This is my primary domain www.adservs.in and this is my secondary domain adservs.co.in

PageRule for secondary domain Screenshot by Lightshot

Now if I add Always Use HTTPS in page rule the the redirect rule doesn’t work.

Please advise solution on this where I can access my primary domain with direct adservs.co.in and it opens with https also my subdomain also opens without https… each and every time I have to add https prefix Like if I open my subdomain text.adservs.co.in it will open without https when I add a complete URL https://text.adservs.co.in then only the URL opens.

May I ask does www and text exist as a DNS record (hostname) under the DNS tab of Cloudflare dashboard for your domain name?
Are they both proxied and set to :orange:?

Before moving to Cloudflare, was your Website working over HTTPS connection?

May I ask what SSL option have you got selected under the SSL/TLS tab at Cloudflare dashboard for your domain ( Flexible, Full, Full Strict … )?

When I open www, I got redirected.
Furthermore, when I open HTTPS text, it loads fine and even with HTTP - or that could be by Web browser’s settings “HTTPS-only”.

Nevertheless, while testing, I see HTTP test does not redirect me to HTTPS test → that’s the issue here, right?

Few helpful tutorials (just in case):

1 Like
  1. No in DNS there is no www pointed… Only CNAME pointed as alias www.adservs.co.in for adservs.co.in and some A records to redirect to IP using sub-domains

  2. No before I was not having SSL, hence choose a free pack from cloudflare.

  3. It’s on Flexible

  4. When we first opens with www or https://www it save in cache and can be open with only adservs.co.in (I Guess).

  5. Yes, thats the issue, if someone types adservs.co.in the it should redirect to adservs.in with https

O-oh, it looks to me here is the first issue.

You would want to fix this first and switch to Full (Strict) SSL.

Flexible SSL is really not recommended to use as there could be multiple :bomb: :boom: :exclamation: issues caused by using it as follows at the below article like Mixed Content or Redirect Loops, etc.:

Here is a way to re-check if you correctly setup the SSL for your domain with Cloudflare:

In case you do not have an SSL certificate, you can use Cloudflare SSL, if so, kindly make sure you follow the instructions as follows on the below article to setup an SSL certificate using Cloudflare Origin CA Certificate:

Last but not least, kindly have a look here for more information regarding correct SSL settings at the SSL/TLS tab on Cloudflare dashboard:

Currently, I got an error and see no A records found for adservs.co.in:

;QUESTION
adservs.co.in. IN A
;ANSWER

Kindly, consider adding the missing A @ or CNAME @ record (CNAME adservs.co.in or A adservs.co.in) → I would remove all the CNAME and use only A type records.

Therefore, I would configured and set the redirections (both for www or non-www and a test sub-domain) using Page Rules and instructions from my above post.

Using instructions from the below tutorial you can Add a new or Edit existing DNS records:

1 Like

I tried changing SSL to Full (Strict) it works only for main domain… But it throws error for sub-domains that says Invalid SSL certificate. Also sub-domains open in without https, when I manually typed https it says invalid SSL Certificate.

I see in A record I can add @ in root name but it is asking for an IP (I don’t know what’s the IP)
Also in CNAME it give this error (DNS Validation Error (Code: 1004) CNAME content cannot reference itself.)

@fritex actually my website is not hosted on hosting it is hosted on google drive and published by drv.tw hence there are some CNAME records to be added by drv.tw instructions which I can’t remove.