Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

New Server test site (with IP) forwards to domain-com on 'old' server

Discussion in 'General Discussion' started by friedbrain, Feb 3, 2012.

  1. friedbrain

    friedbrain Member

    Joined:
    Feb 2, 2012
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    51
    cPanel Access Level:
    Root Administrator
    A funny things happens on some domains.
    I have a domain name assigned a certain IP, say 111.111.111.111 is associated with domain-com. But the IP is on the new server where I'm setting everything up while the sites are still running on the old server.

    When I go to the http://IP it takes me automatically via a 301 redirect to domain-com. Even the
    http://IP/~username/ does the same. I need to really test them on the new server
    before switching though so can I turn this (whatever it is) off?

    Thanks
     
  2. friedbrain

    friedbrain Member

    Joined:
    Feb 2, 2012
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    51
    cPanel Access Level:
    Root Administrator
    Sorry to bump this thread but it's happening to my other accounts.
    Where I have a dedicated IP assigned to a domain name, it forwards to the name.com when I visit http://ip.number/
    Sucks because I can't test the site before switching servers.

    Any work around? Is it the ns settings?

    Thanks,
     
  3. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,170
    Likes Received:
    370
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You might check your settings here: WHM > Security Center > Apache mod_userdir Tweak

    And you might check the accounts for unwanted htaccess settings.

    Not sure what else it would be off hand.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,793
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    You likely have a redirect in the .htaccess file as Infopro mentioned. However, you may also need to check the script configuration. Sometimes a script will have a setting for domain name, and will automatically redirect to it as opposed to using the URL in the address bar. In these cases, you should adjust the script configuration to the IP address temporarily.

    You could also update the hosts file on your own machine to point the domain name to the new IP address. At that point, you could access the domain name directly.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. friedbrain

    friedbrain Member

    Joined:
    Feb 2, 2012
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    51
    cPanel Access Level:
    Root Administrator
    Thanks guys,
    it was the hosts file on my Windows machine that worked. I tried figuring out the rest but gave up. After all it worked well in the old server and want it to work the same on the new one.
     
    #5 friedbrain, Feb 7, 2012
    Last edited: Feb 7, 2012
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice