Extra hosts and TLD

I want to have a server in my network to be given something like a TLD. The best I’ve been able to do,e up with is using extra_hosts like:

    - a:

However if I do the following (both linux and windows)

ping a

I get unresolved host errors. But adding a . at the end works

ping a .

The same holds true in browser calls. Is there another way around this so I don’t have to “dot” the address?