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.

stop page redirects when using server name vs domain name

Discussion in 'General Discussion' started by aklein, Nov 6, 2013.

  1. aklein

    aklein Registered

    Joined:
    Nov 6, 2013
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Let me prefix this by saying I have not searched as I am not really sure what keywords to use to find the answer.

    I have a server that has only 1 site on it. Apparently search sites are indexing the site by using the server name vs the actual domain name. so its indexing pages like http://servername/pagename vs http://domainname/pagename.

    The page renders when either is used. I want to break it so if you visit the URL with the servername in the URL it does not render to stop search sites from indexing this way.

    I have not been able to find the proper setting to change in WHM.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You should not be able to access your web pages using the server's hostname by default. Try rebuilding the Apache configuration file and clearing your browser cache to see if the issue continues:

    Code:
    /scripts/rebuildhttpdconf
    Thank you.
     
  3. aklein

    aklein Registered

    Joined:
    Nov 6, 2013
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks for the above. I ran the script you referenced and then restarted apache and loading pages via http://servername/sitepage is now broken and puts up a cpanel error.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Yes, this is the intended behavior. It should load the default cPanel page.

    Thank you.
     
Loading...

Share This Page