Ssl not working without www

Hello everyone

My website will show not secure if i don’t insert www. before my domain meanwhile https://www.battlaxe.online or www.battlaxe.online works perfectly fine and its secure as well so after a research i have added a htaccess file to the file directory but still no luck please help this is my htaccess code :

RewriteEngine on
RewriteCond %{THE_REQUEST} /([^.]+).html [NC]
RewriteRule ^ /%1 [NC,L,R]

RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^ %{REQUEST_URI}.html [NC,L]

DirectoryIndex index.html

RewriteEngine On
RewriteCond %{HTTP_HOST} ^battlaxe.online [NC]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

thanks a lot

First question, do you have a valid certificate on your server configured?

i am using http://www.ultimatefreehost.in/ its a free host i guess i don’t have a valid certificate i just connected my domain into cloud-flare with dns

i am using http://www.ultimatefreehost.in/ as free host server i guess i dont have a certificate on the server is it possible to have one for free ??

You still need to have a certificate on your server. Check out Cloudflare’s own Origin certificates, but that still needs to go on your server.

What you should do now is pause Cloudflare (Overview screen, bottom right), fix your SSL setup, and only unpause Cloudflare once that is working.

okay i am gonna try thanks

hello i am hosting my domain name on infinityfree now and i already install a certificate on infinityfree using cpanel as you said and my domain name dns is connected to cloud flare the problem remain the same if i dont insert www or https my website will still show not secure please anyone help

this is my domain : www.battlaxe.online

Can you post a screenshot of your DNS records? Feel free to redact the IP addresses.

I assume you have a page rule in place redirecting to “www”, right?

I’d say that .140 simply is the wrong IP address and it should rather be .216, but you might want to clarify this with your host first.

look i am sorry but i am totally new to this !! look my host dns list is empty now

Your host’s records are of no relevance as you have everything on Cloudflare. You have the wrong IP address on Cloudflare and need to clarify with your host which one the correct one is and then fix that.

ok ok i got u now is there anyway to know the right ip address without contact the host support cause no one is gonna reply to a free user lol

Well, I did mention the most likely address earlier but if that does not work you could only set the nameservers back to your host, remove the domain from Cloudflare, and start the setup anew.

thanks for your help but i am still confused what to do anyway :stuck_out_tongue: thanks


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