The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Site is Redirecting to www.* when rules don't exist

Discussion in 'General Discussion' started by RCady, May 3, 2017.

  1. RCady

    RCady Registered

    Joined:
    May 3, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Kansas
    cPanel Access Level:
    Root Administrator
    Hi there!
    I've been scouring the interwebs all over for this and haven't been able to find a solution. If there's a similar question that was solved feel free to send me that way.

    The issue I'm having is that our .htaccess files do not contain any rewrites that append www. to our domain name.

    However, when accessing the site, (after clearing cache, dns, etc) it will still redirect to www.*

    What can we do to figure out what's causing this issue?

    Thanks!
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you try uploading a test HTML file to the website's document root (e.g. public_html) and see if you can reproduce the behavior when opening the HTML file in a browser? If you can't, then it suggests there's a configuration in the script's database or configuration file that's resulting in the redirect.

    Thank you.
     
  3. ottdev

    ottdev Well-Known Member

    Joined:
    Oct 1, 2013
    Messages:
    73
    Likes Received:
    2
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    For the OP RCady, are you using the hosting nameservers or a registrar or third party?
    It could be that www .domain. tld points to the server hosting your account
    while domain.tld points to your registrar's network and there is a redirect specified there.

    If you look up [ANY] records for your domain both with and without www
    Click the link on the next line to do that:
    Dig (DNS lookup)
    look for the line with: IN A X.XX.X.XX
    If they are different numbers, this is your answer.
     
  4. kdean

    kdean Well-Known Member

    Joined:
    Oct 19, 2012
    Messages:
    269
    Likes Received:
    14
    Trophy Points:
    18
    Location:
    Orlando, FL
    cPanel Access Level:
    Root Administrator
    Also, if you're just typing "domain.com" in your browser, your browser may be adding the www. Try typing the following specifically instead and see if it acts the same.

    Code:
    http://domain.com
    Another possibility is if the site is running a CMS like Wordpress, it may be configured to use www. and the software is handling the redirect.
     
Loading...

Share This Page