Domain and Server How-To

The main prerequisite for running a domain with a server on it is a proper cable connection which is DSL rather than ADSL. The latter is fine for a client network where most traffic flows downstream to you, whereas with a server you need the more symetrically rated bidrectional flow of DSL rather than Asymetric DSL. The next step to having a domain is checking it's availability with a search engine. If your choice of domain name isn't listed then move quickly to park it. There are a few reputable companies that will do this for you and it's their main role on the internet. The likes of GoDaddy , IONOS and Freeparking are known to be good in the UK. To check your STATIC Ip address and make a note of it on your DSL connection, on which the modem must never be switched off now, click here . This is the Wide Area Network (Internet) side address of your connection that needs registration with DNS (domain parking). A minimum period for domain registration is usually two years, this is a sensible initial investment. If you do end up running a successful concern domain name renewal is something that the DNS company will remind you needs attention before your domain name is snatched up by some other DNS company to be auctioned or held to ransom in other words.

When your domain is up and running with DNS test it with a ping in a DOS Window or at the linux command line on a LAN side PC. This will tell you soon after DNS registration when your domain name has propagated throughout DNS on the Internet and actually resolves name to Ip address. This brings us to the subject of setting static addresses on the LAN side of your router for your PCs.

Routers use one of two address ranges to give each client device (such as a PC) an address each with DHCP. One of these ranges is [10.x.x.x] and the other is [192.168.x.x]. To see which range the router is using on your LAN in Windows at the DOS prompt type "winipcfg" or later versions "ipconfig". In linux that translates to "ifconfig" on the command line. We are now going to set those addresses permanently on your client devices using manual config rather than letting DHCP give varying addresses at switch on of each client. This enables the server on the LAN to have a permanent LAN address to route it's Internet traffic to.

To route traffic from the Internet incoming direction needs bit of setup at the router. This is variously known as port-forwarding or NATting (Network Address Translation). The webserver port is HTTP which is port 80 usually. You should know your router (gateway) address from "ifconfig" on a linux client or "ipconfig" in Windows. Enter your router address into a client machine browser and look for the port-forwarding or NAT feature and route Internet side HTTP or port 80 to the server address on the LAN port 80. You could be running Apache in linux on your server or perhaps IIS or Aprelium Abyss in Windows. These HTTP server softwares are documented elsewhere. I would say that if you are using Windows 7/8/10 Pro or such that you need to turn IIS on in Windows Features (Control Panel/Programs and Features). All webservers require at least an index page in the wwwroot directory to start a site with. The rest is web coding work beyond the scope of this article.

Described next is setting up Google Webmasters and Analytics accounts.

Your webserver possibly hosts more than one site. All your sites need to be listed in the root directory of the server in a sitemap for Google. This is a plain text file called "sitemap.txt" with a list of the urls for each site. As follows:-

You should have a Google account already. Into a search engine enter "google webmasters tools" and select the result from the index. Login to Webmasters Tools with your existing login credentials. Click "Add A Site" and enter the domain name into the dialogue box that appears. Google will now "crawl" your site and retrieve your index page for your main site. Your main site thumbnail image should appear on the page. Click on it and then at the left of it under "Optimisation" select "Sitemaps". Then "Add Sitemap" then refresh the page. The number of sites on your system should be indicated. Return to the home page of Webmasters Tools and add each seperate site as a new entity. A corresponding clickable thumbnail for each site appears. At the right hand side of each site section is the "Manage Site" button for Google Analytics site association. Beginning with your main site click "Google Analytics Property" and then select the site on the next page and click "Create Google Analytics Account". Create an Analytics account for each site on your server. Each Analytics account will give you your visitor stats in grahpical form with information as to country, browser type, OS and ISP. This information is presented in an attractively business-like way.

This next section deals with mail server setup using the Exim 4 SMTP and Dovecot POP3 softwares and applies only to linux systems.

The type of mail server described here will service a LAN subnet and send and recieve mail for the domain to/from other mail servers on the Internet. If using a debian or ubuntu OS the server softwares should be installed with Synaptic or "apt-get", that's Exim and Dovecot. Exim is the SMTP server which is the actual Mail Transfer Agent accepting incoming mail from both LAN and Internet via SMTP and sending outgoing mail using the same protocol. Mail client software on LAN workstations needs to collect incoming mail from the server with Post Office Protocol 3 (POP3) and Dovecot serves this protocol to clients from the server. For Exim configuration see here but where the article specifies the listen on "" address (localhost) use the LAN Ip address of the server, in other words the server's interface Ip address. For "machines to relay mail for" addresses enter your LAN series of addresses. All that remains for SMTP incoming and outoimng mail transmission from the server to the wide area network is the NATting (port-forwarding) of port 25 to the server machine at the router. The domain should now accept and be able to service SMTP connections. POP3 server software Dovecot should be configured as here with "mail_location" usually taking the "mbox" option with the default settings used in Exim 4 configuration.

To be continued...

©2013 Andrew Batty