Static DNS help

Hello ,
I have a newrok and in it I have a computer with address 10.0.0.100
I want the user will write
Myserver.com and them enter the computer and not 10.0.0.100
I have done this :
/ip dns static
add address=10.0.0.100 name=MyServer ttl=5s

but I can’t reach it
when I enter 10.0.0.100 it’s working ,
why?

Thanks ,

/ip dns static add address=10.0.0.100 name=myserver.com

… on client, the DNS must be set to RouterOS address, if it’s Windows try ipconfig /flushdns , than try nslookup myserver.com

the dns set to the router (The router is DHCP server also ), so this is not the problem.

why do I have to write *.com? this has no meaning ,no?

Do you use Windows? If so, it doesn’t work with hostname without any dot, because system appends current host’s domain, before trying to resolve it. You’d have to enter “myserver.” with trailing dot.

Whenever you use an unqualified hostname - e.g. “ping myserver” - then it is assumed that the target hostname is in the same domain as your local machine is in.
So if your machine is in the domain example.org, and you give an unqualified hostname, the system is going to assume that you MEAN “myserver.example.org

You can use whatever domain suffix you like on your lan - be sure that the DHCP service is assigning it so that it’s consistent with all hosts on the network
This is set in /ip dhcp-server network
so if you set the domain suffix to be “local” for instance, then everything is going to be “myserver.local” and “myPC.local” - etc…
Then in the Mikrotik’s static DNS, you would specify “myserver.local” → 10.0.0.100

Thanks ,
I have added

myserver.david

and now it working

thanks ,

hey, just let me know where did you write myserver.david? just im doing same

Thanks