Click here to Skip to main content
15,896,118 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hi,

I have a HTTP server running fine, but I have to access files on it via its IP Address in the URL bar, for example 86.xxx.xxx.xxx:8080/home.html, but I want to use a name instead of its IP for easier access, eg. rixterzserver.com/home.html. I researched this and didn't find much except that websites use DNS servers to change the name entered into its ip address, so the user can access the server with that ip address. This must be possible as sites that sell domains must get them from somewhere... would I have to create a DNS server?
Posted

Just read the standards on DNS and implement it using System.Net provided for you in .NET BCL. In essence, DNS is no different from any other services based on network sockets. DNS is just one more application-layer protocol on TCP/IP protocol stack:
http://en.wikipedia.org/wiki/DNS[^],
http://en.wikipedia.org/wiki/Application_layer[^].

Need some code samples, ideas? Do this:
http://bit.ly/RMejru[^].

For example:
http://reflector.webtropy.com/default.aspx/4@0/4@0/untmp/DEVDIV_TFS/Dev10/Releases/RTMRel/ndp/fx/src/Net/System/Net/DNS@cs/1305376/DNS@cs[^],
DNS.NET Resolver (C#)[^].

—SA
 
Share this answer
 
Comments
[no name] 31-May-14 7:34am    
No, sorry, I didn't mean what I think you thought I meant. It's basically because I want to get a free domain name. So surely, if users can type in "86.xxx.xxx.xxx:8080/home" and get to my server, they can type in "rixterzserver.com/home"? I don't want to map a domain name to my IP; I want to make a domain name and allow people to access the server using that instead.
If the goal is to learn how to write one, use Sergey's suggestion.

Otherwise, if you are only interested in a solution to solve your problem, I'd recommend simply installing existing DNS server software on a "server" on your LAN and point your PCs to use it as their DNS server.

A search of Linux repositories turns up a number of them, or, on Windows, you could use this: http://maradns.samiam.org
 
Share this answer
 
Comments
[no name] 31-May-14 11:40am    
But that would mean that I would have to set every computer in the world to use my DNS server to access my web server. I just want a domain name instead of having to type the ip address.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900