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!

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:
    689
    Likes Received:
    14
    Trophy Points:
    68
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    689
    Likes Received:
    14
    Trophy Points:
    68
    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?
     
    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,794
    Trophy Points:
    363
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    689
    Likes Received:
    14
    Trophy Points:
    68
    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?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    689
    Likes Received:
    14
    Trophy Points:
    68
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
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