I’ve been getting quite a few hits from Google to the DNS Guide post from people searching for how to set up a sub subdomain.
It’s quite simple actually. Say you want to set up a sub sub domain sub2.sub1.domain.com. All you need to do is create an A record for sub2.sub1.domain.com and point it to the required IP(the IP of the server hosting the sub sub domain). If you want www.sub2.sub1.domain.com to work(not required in most cases), you should create another A record for www.sub2.sub1.domain.com and point it to the same IP. This can also be done using a CNAME record.
So, if the server that is going to host your sub sub domain has IP 126.96.36.199, your DNS records should be like this :
[plain]sub2.sub1.domain.com. A 188.8.131.52
www.sub2.sub1.domain.com. A 184.108.40.206[/plain]
If you want to use CNAME records :
[plain]sub2.sub1.domain.com. A 220.127.116.11
www.sub2.sub1.domain.com. CNAME sub2.sub1.domain.com.[/plain]
There may be a lot of reasons why someone would want to use a sub sub domain; the most important of them being forming meaningful(or desired) words/phrases out of a domain name. One of the most popular example of a site on a sub sub domain is www.Del.icio.us. It clearly illustrates the usefulness of a sub sub domain.
In a default phpBB3 installation(without an SEO mod), the same thread can be accessed through many URLs. For example, the thread Favourite Animorphs fanfiction can be accessed through these different URLs :
The agressive Googlebot might pick almost all of those links and it might lead to potential ranking problems in SERPs.
One way to resove this duplicate indexing is to install an SEO mod like PhpBB-SEO.com SEO mod or Handyman’s SEO mod. But, installing and updating a mod with each phpBB3 update and/or mod update might get harrowing and burdensome. An alternative, albeit easier way to prevent duplicate indexing is to add these lines to your robots.txt :
This will forbid all bots following robots.txt directives to crawl the redundant URLs. Your threads will only be accessible to the bots through the URL http://www.domain.com/viewtopic.php?f=X&t=X.
Note(1): If you display Google Adsense ads in your forum pages, you might need to allow the Google Adsense bot(Mediapartners-Google) to access the ‘forbidden’ URLs, so that it can crawl the pages and display relevant ads. So, you need to add these ‘extra’ lines to your robots.txt :
This will allow the Mediapartners-Google bot to access the forbidden URLs.
Note(2): If your forum is on a subdirectory(say /forum/) rather than the root, append “/forum” to the robots.txt directives. It should look like this :
DNS or Domain Name System, is a core Internet protocol/mechanism which resolves text URLs(FQDNs) into IP addresses. It is the protocol which translates hostnames such as “www.google.com” into it’s IP address -“18.104.22.168″. In essence, it acts as the ‘phone book of domain names” and mapping the names(domain names) to their phone numbers (IP addresses). This system also stores other information about a domain, such as it’s mail servers.
The most dreadful situation is when your DNS is set up incorrectly. Most webmasters dread the thought of incorrectly configured DNS, as they can’t figure out where they went wrong. But troubleshooting DNS problems is very easy, considering you know how to use tools like nslookup, dig, bind, etc. Before we go into tutorials, it would be a good idea to look up the various types of DNS records at Wikipedia.
Here we’ll be discussing about various scenarios faced by domain name owners while configuring their DNS.
First you need to add your sub-domain, say “flavour.mydomain.com” to the control panel of the other host, so that they can add your domain their name-servers and create the required A records. Next, you need to know from your new host, the IP address of the server on which your sub-domain is going to be hosted. Say it is “22.214.171.124”. Now you need to go to your DNS management console of your domain registrar/host and create A records for that sub-domain pointing to the IP address of the server of the new host. So, your DNS records should look like this :
flavour.mydomain.com A 126.96.36.199 www.flavour.mydomain.com A 188.8.131.52
Add the second A record only if you want www.flavour.mydomain.com(a sub-sub-domain) to work. It is always a good idea to add records for “www.flavour.mydomain.com” and then 301 redirect all traffic from “www.flavour.mydomain.com” to “flavour.mydomain.com”.
The above effect can also be achieved by using a CNAME record instead of an A record, but using a CNAME record is not recommended because of theoretical overhead issues. But if you want to do what’s not recommended, add a CNAME record pointing “www.flavour.mydomain.com” to “flavour.mydomain.com”; so that the DNS records looks like this :
flavour.mydomain.com A 184.108.40.206 www.flavour.mydomain.com CNAME flavour.mydomain.com
Give some time for the DNS changes to propagate(Usually around 30 minutes) and start using your sub-domain right away.
First of all, I’d recommend transferring your domain from the registrar/moving away from host which doesn’t allow you full DNS control. But if you are hard bound to stay with them, there is still hope for you. There are a lot of 3rd party DNS hosts who would host your domain’s DNS for free. Some of the most popular ones are EditDNS and Afraid.org, but there are quite a few other free DNS hosts which are equally good. I’ll be using EditDNS for this guide.
First of all, register with an account with EditDNS. After signing into your account, navigate to your Control Panel and add your domain(say “mydomain.com”) without www. In the “Default IP” box under Optional Settings, enter the IP address of the server which hosts your domain.
Click on “Add domain”. After adding your domain, you’ll see that your domain name is written in red. Don’t worry, this is perfectly normal. It’ll go back to normal after you change your name servers to that of EditDNS’s and the changes propagate. Now, click on the “Edit” icon beside “mydomain.com”. You’ll come to a page that looks like this :
Take a note of the name servers (highlighted in red).
List of nameservers (US only) :
List of nameservers (EU only) :
List of nameservers (EU+US) :
To change between US/EU/EU+US name servers, click on the corresponding link after “Change NS: ” in the “Additional Services” section. I’d recommend changing to EU+US name servers because it will be more fault-tolerant and your domain will resolve faster across the globe.
Now you need to go to your DNS management console of your domain registrar/host, delete all name servers and add the EditDNS’s name servers. Now, let’s go back to EditDNS’s DNS management. To add a record, type in the record name, select the type of record (A, AAAA, CNAME, MX, SRV, TXT, PTR) and type in the IP/Hostname. Don’t change the AUX and TTL values unless you need to. A TTL value of 86400 seconds is enough for your domain. To edit a DNS record, double click on it, make the necessary changes and click on “Save”.
The purpose of this blog is to present some useful technology titbits (and maybe other stuff too) that I’ve either learned on my own or from somewhere else. Hopefully this will help someone out there with a problem.
For those of you who thought this was about the “Hello world” program, don’t be disappointed. Here you go :