Problem with automatic www redirect
I don't know how but one whm account is automatic redirect from no-www to www.
I searched on .htacess from this account and I can't found records that is redirecting it. On cPanel's GUI redirects I can't found records too. But, always when I try to enter in the main domain using browser without www, always it's go to www.domain.ltd . I found what is making this redirect. There are one html file returned on the first request that have one meta in it that redirects to www, but I can't find where I can turn it off.
This is the html returned from server when I'm try to access domain.ltd:
Anyone knows where in apache config files this return can be set? Or it's one config that I can set off? Thanks
Anyone knows where in apache config files this return can be set? Or it's one config that I can set off? Thanks
-
You should simply remove the Meta refresh line from the HTML file to keep it from redirecting to www. So remove: And save the file. This should stop it from refreshing to the www version of the site. 0 -
You should simply remove the Meta refresh line from the HTML file to keep it from redirecting to www. So remove: And save the file. This should stop it from refreshing to the www version of the site.
You didn't understand: on main index.html in root of this domain don't have this meta. The file is other. For some reason apache is delivery this html file with body tag's empty with only one this meta redirect instead of delivery the correct html that are in root of this domain. When I request www.domain.ltd, apache send the correct html file. But when I try to connect using domain.ltd, this incorrect html is returned. I don't know how. Because of this I want to know where I can find this. Do you understand?0 -
I found the problem. The www is pointing to one server and no-www to another. 0 -
There are only 2 places it would cause this a redirect. A redirect/rewrite rule in the .htaccess file. Or a Meta Refresh in a index.html, .htm, .php etc.. file. I would check to see if you have any other index.XXX files that may have the refresh in them. Also I would check and make sure the DNS records for www and non-www are pointed correctly. Also may need to try clearing browser cache or using another browser you have not visited the site on yet or private tab/window and see if you get the same results. You should not be editing the httpd config at all with cPanel manually. 0 -
Great, I was typing out my response when you replied that it could be incorrect DNS records. 0 -
Great, I was typing out my response when you replied that it could be incorrect DNS records.
Thanks for yout help. All you explain above is what I know. That's why I came here because could be another option only on WHM plataform. But, the error is always a user error LOL.0 -
Hi @Ot"vio Serra I'm glad you were able to identify the cause of the issue! Thanks for updating the thread with that. 0
Please sign in to leave a comment.
Comments
7 comments