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.

How to stop redirecting shared IP to a domain

Discussion in 'Bind / DNS / Nameserver Issues' started by Deker, Jul 1, 2017.

  1. Deker

    Deker Well-Known Member

    Joined:
    Feb 15, 2011
    Messages:
    87
    Likes Received:
    3
    Trophy Points:
    58
    The main IP is fine. Our problem is with one of our resellers IP address. The IP is redirecting to one of his domains.
    Any idea how to stop the redirection and showing cgi-sys/defaultwebpage.cgi instead?
     
  2. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    588
    Likes Received:
    88
    Trophy Points:
    153
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Deker,

    2 things.

    1. Can you confirm its a shared IP?

    Go into WHM > Show/Edit Reserved IPs

    Scroll down to said IP, does it say "Dedicated to" or "Shared IP address for"?

    2. Does it only go to a specific website if you browse to the IP over https or it affects http as well?
     
  3. Deker

    Deker Well-Known Member

    Joined:
    Feb 15, 2011
    Messages:
    87
    Likes Received:
    3
    Trophy Points:
    58
    Hi Jcats,
    1. It's a shared IP.
    2. I just found http is ok. Only https is redirecting. How to fix this?
     
  4. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    588
    Likes Received:
    88
    Trophy Points:
    153
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    That's because of SNI, anytime you install an SSL on a domain that resides on a shared IP any domain that does NOT contain an SSL will automatically default to the first virtualhost in the Apache conf that DOES have an SSL.

    You would want to either install SSL's on ALL domains, or what you can do is install your server hostnames SSL and then set that SSL as the Primary SSL.

    Steps are:

    -WHM > Service Configuration » Manage Service SSL Certificates
    Click "Apply Certificate to Another Service" on any of the services, the boxes will prefill. Copy the first box "Certificate".

    -Then go to WHM > SSL/TLS » Install an SSL Certificate on a Domain
    Copy / paste the certificate into the Certificate box and click "Autofill by Certificate", all boxes will prefill.

    In the "IP Address" box make sure to fill in the shared IP of the reseller.

    Click Install.

    -Finally, go to WHM > SSL/TLS » Manage SSL Hosts

    Search for your server hostname, there may be more than one so find the one that is tied to the IP in question. To the far right column, click "Make Primary".

    Now anytime you visit any domain over HTTPS(that does not contain an SSL) or https://IP you will be directed to the default cPanel page.
     
  5. Deker

    Deker Well-Known Member

    Joined:
    Feb 15, 2011
    Messages:
    87
    Likes Received:
    3
    Trophy Points:
    58
    The first solution did not work. I installed SSL on all domains but it still redirects to the domain.
    So I performed the second solution. In the "Manage Service SSL Certificates" there are only certificates for server hostname (for services such as cpanel,whm,webmail,exim,dovecot and ftp).
    I clicked "Apply Certificate to Another Service" and then copied the certificate. But when I paste it into the "Install an SSL Certificate on a Domain" it says "The certificate does not match your selected domain."
    The selected domain is the main reseller domain. Am I missing something? I think it's because the certificate is issued for main server IP.
     
  6. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    588
    Likes Received:
    88
    Trophy Points:
    153
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    You mean the domains you installed the SSL on still redirect to the other domain? or going to https://IP goes to the domain. If the latter, it means you have to change the Primary SSL in Manage SSL Hosts

    Yeah it will until you click the "Autofill by Certificate" button, not sure if you missed that. It will prefill the domain box with your server hostname. Then simply enter in the IP of the reseller account and hit install.
     
    Deker likes this.
  7. Deker

    Deker Well-Known Member

    Joined:
    Feb 15, 2011
    Messages:
    87
    Likes Received:
    3
    Trophy Points:
    58
    Both methods worked well.
    Thank you so much Jcats :)
     
  8. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    588
    Likes Received:
    88
    Trophy Points:
    153
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    No problem, glad to hear it! :)
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

Share This Page