0

I have a Windows Server 2012, with IIS 8 installed. I have multiple websites there. I also have the Default Website.

When I create a new website like www.abc.com and abc.com, it works fine. However, when a customer enters an invalid subdomain to abc.com (a subdomain definition that is not actually there), like xyz.abc.com, it automatically redirects to my Default Website which is a landing page.

Instead, I want to return a custom 404 page from IIS. Is that possible?

Thanks.

Mein Hat
  • 3
  • 1

1 Answers1

0

What you want to do is set up a separate site for your landing page. In the landing page you want to have the bindings set up for whatever domain names you want to land there. This would leave the default website as a fallback for any other names entered.

Tim Brigham
  • 15,465
  • 7
  • 72
  • 113
  • Hi. The thing I am confused is, there is no binding made in my IIS website like qwerty.abc.com, but there are only www.abc.com and abc.com. Now, I need to get a custom 404 page when people tries to go qwerty.abc.com because it actually doesnt exist. However, now I get ERR_NAME_NOT_RESOLVED error but not a 404 page. I am really confused... – Mein Hat Jan 12 '16 at 16:19
  • 1
    @MeinHat If you're getting an error about the name not being resolved, have you checked your DNS entries for a wildcard DNS record like *.abc.com that points to your web server? – Todd Wilcox Jan 12 '16 at 18:27