How to set up a sub subdomain

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 All you need to do is create an A record for and point it to the required IP(the IP of the server hosting the sub sub domain). If you want to work(not required in most cases), you should create another A record for 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, your DNS records should be like this :

[plain]   A   A[/plain]

If you want to use CNAME records :

[plain] A   CNAME[/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 It clearly illustrates the usefulness of a sub sub domain.

Prevent duplicate indexing of phpBB3 threads by Google

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 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 :

User-agent: *
Disallow: /viewtopic.php?p=
Disallow: /viewtopic.php?=&p=
Disallow: /viewtopic.php?t=
Disallow: /viewtopic.php?start=
Disallow: /*&view=previous
Disallow: /*&view=next
Disallow: /*&sid=
Disallow: /*&p=
Disallow: /*&sd=a
Disallow: /*&start=0

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

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 :

User-agent: Mediapartners-Google

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 :

User-agent: *
Disallow: /forum/viewtopic.php?p=
Disallow: /forum/viewtopic.php?=&p=
Disallow: /forum/viewtopic.php?t=
Disallow: /forum/viewtopic.php?start=
Disallow: /forum/*&view=previous
Disallow: /forum/*&view=next
Disallow: /forum/*&sid=
Disallow: /forum/*&p=
Disallow: /forum/*&sd=a
Disallow: /forum/*&start=0

If you face any problems, leave your comments and I’ll look into it.

A guide to DNS

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 “” into it’s IP address -“″. 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.

Scenario 1 : You need to host a sub-domain on another host or on a different server with a different IP

First you need to add your sub-domain, say “” 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 “”. 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 :   A   A

Add the second A record only if you want sub-sub-domain) to work. It is always a good idea to add records for “” and then 301 redirect all traffic from “” to “”.

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 “” to “”; so that the DNS records looks like this :   A   CNAME

Give some time for the DNS changes to propagate(Usually around 30 minutes) and start using your sub-domain right away.

Scenario 2: Your registrar or host doesn’t let you manage your DNS

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, 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 “”) without www. In the “Default IP” box under Optional Settings, enter the IP address of the server which hosts your domain.

Add domain to EditDNS

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 “”. You’ll come to a page that looks like this :

EditDNS name servers

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”.

Scenario 3: Set up a subdomain or a sub-subdomain

To set up a sub domain, simply create an A record for the subdomain and point it to the IP of server on which it is to be hosted.

For example, if you want to create a subdomain called to be hosted on IP, create an A record like this : A

If you want to work, simply create another A record like this : A

To set up a sub-domain, please see this post.

That pretty much ends this guide. If you have any DNS problems, post a comment below and I’ll help diagnose it.

Hello World!

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 :


    [java]class sampleClass
    public static void main(String args[])
    System.out.println("Hello, world");


    [cpp]main() {
    printf("Hello, world");