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.

Redirect visits from domains that are no longer hosted

Discussion in 'General Discussion' started by postcd, Jun 9, 2014.

  1. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    621
    Likes Received:
    6
    Trophy Points:
    18
    Hello, my /var/log/messages shows lines like:

    Jun 9 10:11:50 host1 named[1612]: client 173.194.*.*#61875: view external: query (cache) 'domainname.com/A/IN' denied

    Its many domains that returns these log entries, these domains are pointed to the WHM server, but hosting accounts was terminated long time ago.

    Im curious if there is any workaround how to redirect these visits to some common page which tells that the hosting account for this domain is no longer on this server? Im thinking of it also as an opportunity to advertise (introduce webhosting). thx
     
  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 :)

    Note that access attempts to domain names that resolve to your server but do not have a VirtualHost entry should result in the user seeing the default cPanel page.

    The warning message itself is discussed further in one of your previous threads:

    Named: external view client is denied

    Thank you.
     
  3. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    621
    Likes Received:
    6
    Trophy Points:
    18
    is there any workaround how to redirect these visits to some common page which tells that the hosting account for this domain is no longer on this server?
     
  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
    You can modify the default website page via:

    "WHM Home » Account Functions » Web Template Editor"

    Or, setup up VirtualHosts for specific domain names that you want to redirect.

    Thank you.
     
  5. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    621
    Likes Received:
    6
    Trophy Points:
    18
    This do NOT help, because the domain dont resolve to any website, it just timeout.
    ERROR: I could not get any A records for XY
    WARNING: One or more of your nameservers did not return any of your NS records.

    so how i can do that for all accounts that dont resolve, or all requests that dont match any cpanel account will see certain webpage, no timeout?

    You mentioned VirtualHosts, can you please advice on rule?
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    If a domain name does not resolve to your server, then you can not control what content it's served or where it's redirected to.

    Thank you.
     
  7. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    621
    Likes Received:
    6
    Trophy Points:
    18
    You are wrong. Domain is pointed to the existing nameservers and my server IP. Only there are no A records and such in WHM, because the account for that domain was terminated long time ago.

    My question remains.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    It depends on how the domain name is pointed to your server. If the "A" record is configured at it's DNS host, then it should resolve to your server. Otherwise, you must create the "A" record on your server or else the domain name will fail to resolve. Simply having the name servers set at the registrar is not enough.

    Thank you.
     
Loading...

Share This Page