Skip to main content

Redirect All Subdomains to Main Domain

Comments

5 comments

  • cPanelMichael
    Hello :) To clarify, are you asking for custom Mod_Rewrite rules as opposed to using the wildcard subdomains functionality? Thank you.
    0
  • Jakez
    [quote="cPanelMichael, post: 1738892">Hello :) To clarify, are you asking for custom Mod_Rewrite rules as opposed to using the wildcard subdomains functionality? Thank you.
    Hi Michael, Exactly, That's what I was asking :) However I seem to figure out one part of that and now I want to resolve the last piece of the puzzle. Is it possible to correctly resolve any domain name (say, wildcard) to my server even though I haven't created an account for that domain? I have created my custom nameservers and they are working want. What I want, that any domain which uses my nameservers, should be presented with a static page without any need to create the associated domain account in my WHM/Cpanel. So, such a wildcard acceptance by nameserver is possible? Thanks :)
    0
  • cPanelMichael
    The "Default Website Page" should be visible by default for domain names that resolve to the server but have no VirtualHost, and it's editable via: "WHM Home " Account Functions " Web Template Editor" Thank you.
    0
  • Jakez
    Hi Michael, :) The default website page template works for the cases where I have "created" an account for clients domain and he hasn't uploaded any files yet. Or there was an account which is now deleted - in any case, the default website page template is applicable if there is "any" kind of entry in the system cluster for that particular domain name. My problem is the scenario, that how to resolve a domain name which has no entry in the system cluster - past or present. The server has never heard of this domain name, in any manner. Only the nameservers on domain registrar have been pointed to me. How to present a static page to that? The domain name starts resolving fine as soon as I create a cpanel account for that name. It still presents the template page even after I delete that account. But before creating any entry, the domain simply doesn't resolve to any page. Hope I am clear this time. Sorry for the confusion in my last post.
    0
  • cPanelMichael
    [quote="Jakez, post: 1740042"> My problem is the scenario, that how to resolve a domain name which has no entry in the system cluster - past or present. The server has never heard of this domain name, in any manner. Only the nameservers on domain registrar have been pointed to me. How to present a static page to that?
    There needs to be an "A" record configured for the domain name so it points to an IP address associated with your server. If it's been assigned name servers associated with your server, then you must create the DNS zone. Thank you.
    0

Please sign in to leave a comment.