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

Kornel Mizdalski 5 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.

Internet Information Services
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,254 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,127 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Kornel Mizdalski 5 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.

    1 person found this answer helpful.
    0 comments No comments