Wrong Host name of the website in IIS. Domain name with a hyphen doesn't work.

Kornel Mizdalski 10 Reputation points
2023-02-08T11:37:06.1266667+00:00

Hello, I want to run an application in IIS Server and it must run on host name like a "my-app", but it doesn't work. When I try to run the app with domain "my-app.com" it works correctly. Locally on the server everything works correctly, I can open the "my-app" and "my-app.com website, but I need to host the application in a LAN - in a LAN works only "my-app.com". How can I fix that? I can't run the app on domain other than "my-app", it is imposed by the authors.

I working on Widows Server 2022 Standard, SQL Server 2019 Express, IIS v10, the application is made in ASP.NET Web Forms.

Windows development Internet Information Services
Windows for business Windows Server User experience Other
Developer technologies ASP.NET Other
{count} votes

1 answer

Sort by: Most helpful
  1. Kornel Mizdalski 10 Reputation points
    2023-02-16T07:35:03.39+00:00

    Hi, I found solution for my problem here: https://learn.microsoft.com/en-us/troubleshoot/windows-server/identity/naming-conventions-for-computer-domain-site-ou#dns-domain-names

    Single-label DNS names are names that don't contain a suffix, such as .com, .corp, .net, .org, or companyname. For example, host is a single-label DNS name. Most Internet registrars don't allow the registration of single-label DNS names.

    The DNS server does not accept a single-label domain names without suffix. When I use "my-app" name, the FQDN looks like this: "my-app." - with dot at the end.

    2 people found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.