Skip to main content

Problem with automatic www redirect

Comments

7 comments

  • GOT
    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
  • Otávio Serra
    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
  • Otávio Serra
    I found the problem. The www is pointing to one server and no-www to another.
    0
  • GOT
    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
  • GOT
    Great, I was typing out my response when you replied that it could be incorrect DNS records.
    0
  • Otávio Serra
    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
  • cPanelLauren
    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.