Aha, well I'm trying to try, but with the code alone, the text can't determine the address. So I’m not a DNS master, but otherwise I’m pretty good at arduino. So I've been using it for almost 2 years now.
DNS has nothing to do with your Arduino…
It’s used to pair a ‘hostname’ up with an IP address on your network.
You need to understand how your network operates to use host names.
A host could be your tv, dog kennel or washing machine.
The Arduino simply exists at a known. IP address, and the network knows how to cross-reference it.
Ports are important when it comes to reaching a particular service on your host… e,g. a web server often lives on port 80, other services reside at other port numbers.
Sorry to butt in. But the OP didn't say if this was a public webserver or an internal webserver on their home network.
Or indeed from where the server is to be accessed.
So I hope this helps in some way....
There is a file in Windows called "hosts" (as indeed in linux, MAC etc) where you can map a name to an IP address.
So for example, if you are accessing the server from only from a PC (or PCs) you control, then you can simplify this set-up by using the hosts file. The PC then does the name->IP mapping without an external DNS.
This is really only appropriate for when you have a dedicated IP address for that server.
It's a simple, clean solution where you have a small arduino server on your home network (like a home automation device) and you are accessing that from your own PC/Laptop also on your home network.