3

In the Windows Server DNS role, is it possible to create a DNS entry, such that all devices in my network (also those that are not part of the same domain) can resolve a short hostname (eg: 'test') to the host's static ip address without requiring the FQDN (eg: 'test.example.com')?

What's the proper way to create such entries?

1
  • 1
    Which version of Windows Server?
    – Sam Erde
    Mar 31, 2020 at 18:16

2 Answers 2

2

You are looking for the GlobalNames Zone feature in Windows' DNS server. Here is the original Microsoft document describing the feature.

"...the DNS Server role in Windows Server 2008 supports a specially named zone, called GlobalNames. By deploying a zone with this name, you can have the static, global records with single-label names, without relying on WINS."

The document provides full details, but at a very high level, you'll need to create a new AD-integrated forward-lookup zone called "GlobalNames" and then run the following command on every authoritative DNS sever in your AD forest:

dnscmd <ServerName> /config /enableglobalnamessupport 1

Of course, newer versions of Windows Server cover this pretty well with PowerShell commands now. After creating the forward lookup zone, you can configure it with the Set-DnsServerGlobalNameZone cmdlet.

Once it is configured, records in this zone will be single-labeled and you'll be able to resolve http://test. (This assumes that your non-domain-joined network devices are at least using your server for DNS.)

6
  • Does this work in a standalone DNS server, or does it actually require a domain?
    – Massimo
    Mar 31, 2020 at 18:40
  • I think it's geared more towards a domain-joined system.
    – Sam Erde
    Mar 31, 2020 at 18:45
  • Yes, but does it actually work without a domain? I can't find any docs on this.
    – Massimo
    Mar 31, 2020 at 18:48
  • I have not seen any documentation stating that it does not work outside of a domain, /but/ by definition it does seem to exist to solve a challenge that exists within a domain environment. "The use of single-label names makes it possible for a computer to access hosts such as file and Web servers by using short, easy-to-remember names instead of the fully qualified domain names (FQDNs) that form the default naming convention for Domain Name System (DNS)."
    – Sam Erde
    Mar 31, 2020 at 18:57
  • Just tested it on a standalone WS2019 server, and it doesn't seem to work. Unless I'm doing something wrong, this seems to actually require a domain.
    – Massimo
    Mar 31, 2020 at 19:02
0
  1. Add DNS A-record for your website: mywebsite.mydomain.local (replace 'mydomain.local' with your actual domain name and TLD)
  2. Add DNS CNAME/Alias record: test.mydomain.local
  3. On your web server, add a hostname binding for 'test' (not needed if you've added a wildcard binding to answer to any name), otherwise the website will deny to respond because it isn't configured to listen by that name
  4. On your non-domain hosts, you can test now. If it doesn't work, go to the network adapter properties > TCP/IPv4 Properties > Advanced > DNS. Select 'append these DNS suffixes' and Add your domain (e.g. mydomain.local). This may be needed so that it doesn't try to route the DNS request for "http://test" out to the Internet, but instead assumes its a domain resource and asks your local DNS server to resolve it.

And if that doesn't work, you can always add a hosts file entry, though this is not generally recommended (only because its difficult to maintain and you're likely to forget you have that entry and it may make things not behave like you expect).

Not the answer you're looking for? Browse other questions tagged .