Subdomain Redirect Problem - non www

I have a problem with my subdomain. If my subdomain has www, I want it to redirect to non-www. However, whatever I tried did not happen. I already have a .htaccess file on my site and it was redirecting to Cloudflare before I switched. However, it is not doing any routing at the moment. Cloudflare can also be routed from the rules window. I did this too, but again it was not a solution. As you can see in the pictures, everything seems to be fine. What could be the problem? Why can’t I redirect? The homepage is also OK, it stands as www and the redirection works. My problem is with my subdomains.
Also, if they try to enter my subdomains with www, I get an ssl error. That’s why I want to direct. In the error he gave here;


My Setting ;

1 Like

I’ve already seen this post. However, I do not want to install an SSL in dns or www. I just want to redirect to non-www link if they try to login from www. I don’t think it should be necessary to pay $ 10 for this. Does anyone really pay to redirect the subdomain? Isn’t there a solution?

The tutorial fully outlines your options. Based on your requirements, you’d have to opt for :grey: DNS Only and handle the redirect at your server.

So which ones should I close? Should I just close those who have www.blogs? Or I have to turn off my sudbomains, which is completely and blog. If I do this, will Cloudflare continue to work on my subdomains?

‘www’ for the subdomains (blog, sorucevap, studio) need to be set to :grey: in order for those .htaccess redirects to work. Personally, I’d just delete those, as using ‘www’ in front of a subdomain is completely unnecessary. Unless you’ve advertised that via publicity or a link, nobody should be typing in ‘www’ before a subdomain name. It’s extremely rare to see any organization use ‘www’ in front of a subdomain. They typically won’t even resolve.

But definitely keep the standalone subdomain DNS entries (blog, sorucevap, studio) and they’ll work just fine.

I removed the www from its subdomains and the page stopped loading when entered as www. For some reason he couldn’t access the .htaccess. If it can reach .htaccess when entered with www, there is a redirect to be entered without www. But unfortunately, she did not redirect to the site because she could not reach it. This works, better than giving an error. However, I made a mistake and opened subdomains as www in the first installation. I have subdomains with www on Google. Therefore, it is critical for me to redirect without www for my subdomains. Did you have a suggestion for this?

It sounds like you completely removed the ‘www’ DNS entry for that subdomain, so now someone who tries it with ‘www’ won’t reach anything, as mentioned:

Are you saying that people are trying to use ‘www’ for your subdomains? If so, then you have do as suggested:

Yes, now I get it. Shouldn’t I do it this way solve the problem? Will someone entering my site with www in this way be redirected to a non-www site with.

Yep. That’s it. And then your .htaccess should handle those redirects.

Thanks for everything. Run it now. I wish you a good day :slight_smile:

1 Like

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