Redirecting unexisting subdomains to error page

Discussion in 'General' started by alleks, Oct 6, 2012.

  1. alleks

    alleks Member

    I'm really having an issue with unexisting subdomains. For example, I have created the example.com domain with www. as auto-subdomain, but the problem is that if I go to 1029ur0pa.example.com it'll still open, just as www.example.com

    So, how can I fix that? Any body had this issue before?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The recommended way is to fix the dns record, remove the wildcard record and replace it eith records for subdomains that exist. Wildcard records are bad for search engine ranks anyway.

    Then ensure tht you did not select * as auto subdomain in the site settings for the same reason.

    If you dont want to alter the dns in the first strp, then create a catchall vhost.
     
  3. alleks

    alleks Member

    Oh, I see! I just learned something new, and that you for that Till!

    I decided to go for the DNS solution, but I will investigate the vhost catchall solution later.

    Thank again
     
  4. cfoe

    cfoe ISPConfig Developer ISPConfig Developer

    If you use the "*." auto-subdomain on the site you can set a htaccess file with a rewrite for all requests other than www.example.com and example.com to reply with a 404.
     

Share This Page