Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Feb 2012
    Posts
    16
    cPanel/Enkompass Access Level

    Root Administrator

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

    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. #2
    Member
    Join Date
    Feb 2012
    Posts
    16
    cPanel/Enkompass Access Level

    Root Administrator

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

    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. #3
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,894
    cPanel/Enkompass Access Level

    Root Administrator

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

    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.

  4. #4
    cPanel Staff cPanelMichael's Avatar
    Join Date
    Apr 2011
    Posts
    1,346
    cPanel/Enkompass Access Level

    Root Administrator

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

    Quote Originally Posted by friedbrain View Post
    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?
    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.
    cPResources: Support Options - Submit a ticket here - Additional Support Options - Forums Search - Mailing Lists - Documentation - Migration Services
    -- cPanelMichael - Migration Specialist, Technical Analyst, cPanel Technical Support

  5. #5
    Member
    Join Date
    Feb 2012
    Posts
    16
    cPanel/Enkompass Access Level

    Root Administrator

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

    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.
    Last edited by friedbrain; 02-07-2012 at 05:54 PM.

Similar Threads & Tags
Similar threads

  1. Server Speed Test
    By webstuff in forum New User Questions
    Replies: 3
    Last Post: 09-29-2011, 07:26 AM
  2. Does it matter to use same site domain as the server domain?
    By Optrosk in forum New User Questions
    Replies: 5
    Last Post: 05-06-2009, 03:28 AM
  3. Allow accounts to test site by ip or without domain
    By mindaugas in forum New User Questions
    Replies: 2
    Last Post: 01-29-2009, 12:14 AM
  4. Manually changing forwards on server
    By gawotn in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 08-26-2007, 01:38 PM
  5. mail server (exim) forwards mails marked as spam
    By hariskhan in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 12-11-2006, 01:33 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube