Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution

URL without www redirects to homepage

Hi, I have installed Cloudflare SSL on my website about 10 days ago. Today I noticed that the links without www redirects the page to Homepage instead of the page it’s supposed to. For example, if you go to this URL:


 it works. But if you go to 

it will redirect you to the homepage. I want this to be redirected to the link with www. This problem may be with DNS.

Please give me some solutions to this issue.

Looking forward to your reply.
Thank you in advance.


Re: URL without www redirects to homepage

Got this fixed after adding the below code right after "RewriteEngine On" on my .htaccess file.


RewriteCond %{HTTP_HOST} ^ [NC]
RewriteRule ^(.*)$$1 [L,R=301]


Now the URL redirects to but not to


Let me know if it helps someone else also.