Author: Anurag | Posted: 30-09-2008
Hello all!!!
i was just getting lot of queries regarding setup of GApps with external web host. So basically using GApps for email hosting and using a separate web host for Web hosting.
Now we can have this kind of setup in two ways:
- using DNS hosting of web host
- using external DNS hosts
regarding differences in both i had given here
1st way is quite easy, it just need you to put Google’s mx records at web hosting control panel
But you will need #2 in case of following things:
- web host doesn’t allow using custom mx
- you want to create cname records and web host is not giving option to do so
- you can put only one mx record but still you want all emails on time with full redundancy
- you also want to create advanced records like SPF, SRV etc
So here’s the info on #2
here i am giving some DNS related steps and tricks to do that.
Step 1 – choose DNS Host
Now here you may choose your registrar’s dns hosting (if available) or else you can go with an external free dns host (remember free DNS hosts are highly reliable)
you may go with:
Incase you need something with gurantee, you can try out Googleing for “paid external dns”
Step 2- create GApps records
Now here start creating GApps records….as
- mx records – http://www.google.com/support/a/bin/answer.py?hl=en&answer=33352
- cname record for verification and custom url’s – http://www.google.com/support/a/bin/answer.py?hl=en&answer=47283
- Optional – SRV records – These are to enable usage of GTalk for GAPps account from outside of Google network. Here’s more info. – http://anuragbhatia.com/2008/09/googles-srv-records/
- Optional – SRF records - These are to protect your domain from being used by spammers.
in case you want to use ONLY GApps for sending mail on behalf of your domain, just create this “txt record” at dns hosting for root (domain.com) zone -
v=spf1 include:aspmx.googlemail.com ~all
and incase you plan to use servers others then (but including) Google’s then use this wizard to generate custom SPF for your domain.
Step 3 – Configuring Web Hosting
to configure web hosting, you need to point root zone (i.e domain.com) and also subzones to web hosting server’s ip using “A record”
Now here exists two possibilities:
- your web host gave you web hosting server’s ip (sweet host!)
- your web host gave you only nameservers and not any hosting server’s ip.
in 1st case ignore next section and scroll down and further instructions.
here’s what to do in 2nd case to get ip of hosting server.
Here’s the idea is just to query nameservers given by web host for “A records” of your domain.
proceed as:
- use any dns lookup tool, for simplicity i am using zoneedit’s nslookup tool
- put your own domain in domain field
- select record as “A record” for querying
- use nameservers to query of your web host.
here’s a preview

(click on image to enlarge)
you can also use dig command if you are on Linux, use it as
dig your-domain.com@ns1.your-web-host-server.com a
Thus you will notice output as
[anurag@root ~]$ dig harisri.in@ns1.anuragbhatia.com a
; <<>> DiG 9.2.4 <<>> harisri.in@ns1.anuragbhatia.com a
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 398
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;harisri.in@ns1.anuragbhatia.com. IN A
;; ANSWER SECTION:
harisri.in@ns1.anuragbhatia.com. 60 IN A 72.9.152.48
;; Query time: 253 msec
;; SERVER: 69.56.247.250#53(69.56.247.250)
;; WHEN: Mon Sep 29 16:23:41 2008
;; MSG SIZE rcvd: 65
[anurag@root ~]$
Now after getting ip of web hosting server just create the following records:
- A record for domain.com pointing to that ip
- A record for *.domain.com pointing to that ip
This will enable web hosting on domain.com as well as all subdomains (including www.domain.com)
Step 4 – Changing nameservers of domain
Now just change the nameservers of your domain. Point your domain to nameservers of the dns host you are using.
And done!!!




(2 votes, average: 5.00 out of 5)
Loading ...
Author: Anurag | Posted: 20-07-2008
So after answering lots of queries regarding Web Hosting setup, i thought to post about it here……
This is regarding use of “External DNS Host…”
Most of newbies get confused because of type of setup they want…..
Type of DNS setups of site :
- Web host and dns host both are same…….i.e using web hosts name servers.
- Using separate DNS host and Web Host…
Both setups have their own advantages and dis-advantages…..like
Setup 1
Here we just use all services of web host including DNS hosting too….
like putting nameservers of Web Hosts @ registrar wrks that way…
This setup can be recommended ONLY when the web host is highly reliable and NOT with free or cheap web hosts. The main reason for that being since most of people now-a-days use email at their domain, and using a cheap or free web host’s dns can cause a whole lot trouble
But its always good type of setup when one is having a really good web host having really high (99.9%+) uptime, and one doesn’t needs access to DNS records of domain (which is often not required by a general user hosting one zone with one host!)
Setup 2
This can be a much much reliable setup, i.e having separate dns hosting other then using web hosts servers for dns hosting.
It can be useful as incase web host goes down, one can still have email working (as mostly people have email servers different from web hosting server!)
And also there is an very interesting fact that Free DNS hosts are HIGHLY reliable as comapred to cheap/free web hosts!!!
Thats my personal experience!
So in this setup easy way is just to create the following basic records
- A record for root zone pointing to the ip of the web server of your web host.
- Wildcarded A record (*.domain.com) also pointing to the ip of the web server of your web host (for sub-domains to work…)
- mx records (incase you are using 3rd party email hosting rather then your web host…) so just simply create mx records with proper priority values …and done!!!but in case you have email hosting same as your web host’s then just leave step 3 and everything will go fine
So here’s the comparison b/w the both hosting methods…
Feature’s |
Using Web Host’s DNS |
Using External DNS Host |
Nameserver’s hosting DNS |
often 2 |
mostly 4 |
Control on TTL and SOA Parameter’s |
no |
yes |
3rd Party’s mx records with priorities |
no |
yes |
Shifting web hosting (in case of downtime) |
n/a |
yes |
Email (in case of downtime by webhost) |
down |
up!!! |
Option of hosting sub-domain from other hosts |
no |
yes |
Reliablity |
low |
high |
Creation of advanced records like SRV, HINFO, PTR etc |
no |
yes |
Note: The features of web hosts described here are general features which MOST of Web Hosts offers, and there is always a high probability of different features.
Summary
So finalizing facts, i can just say you MUST go with a good external DNS host (free or paid…) to get full control on DNS things like – DNS records (A,cname,mx,srv,AAAA,NS,HINFO,PTR) , TTL, control on SOA parameters. All these features can be avoided ONLY if you use a really Good web host and are fully satisfied with its features
Thanks for reading and plz don’t forget to leave comments
[poll id="3"]
Author: Anurag | Posted: 23-06-2008
hello friends…many of u ask questions like how internet works.so in this article i m giving the easiest understanding of wrking of Internet using two simple examples…
example 1 – what happens when u type a domain abc.com in ur browser.
example 2 - what happens when u send mail at user@example.com
Example 1:
Now u JUST don’t type abc.com in ur browser do u ? see a simple most common step u do do is Connect Internet !!!
it looks common BUT it is imp…as when u connect to internet (generally)
u get the IP of the DNS resolvers nameservers.Now u got 2 nameservers which will resolve name abc.com for u to an IP
so now u can type abc.com …:)
now as u type,a DNS query is generated.
DNS query-its AIM is here to resolve abc.com to *.*.*.* IP where * is from 0 to 255
Root of DNS query:
1.it goes to nameservers of ur ISP to ask the IP of abc.com….
Now ur ISP can give two answers a)i know the IP as it is in my cache.
b)i don’t know
NOW “i don’t know” here means that it is not in cache BUT as ur ISP namservers know the IP of 13 defined Root Nameservers so it will forward ur dns query to anyone of Root Nameserver depending upon which is near and many other factors.
2.now ur dns query as Root Nameservers about abc.com root nameservers say-keep EVERYTHING on one side and tell me what is last so here it is com (from abc.com)
now they again forward dns query to Generic TLD servers i.e which know about the Authoritative Nameservers of any .com,.biz,.net and .org
3.so now ur query is at Generic Servers.there it asks for the IP of abc.com….they say “i don’t know about abc.com’s IP but i have it as an sub-zone under com and i m having its nameservers as NS and u may go there”
so Generic servers return Nameservers as well as their IP (Glue records) to the dns query.
4.so the dns query is forwarded to other nameservers (which are GENERALLY Authoritative DNS servers of the domain).now it asks for abc.com to it.
it can return these answers:
a)i know the IP as an A record…->end of quiry as IP of abc.com hd been returned
b)i don’t know IP but i have its NS records pointing to any other (may be) authoritative servers.so now query further routes and this go on untill query ends ….i.e get A records or show up DNS error.
c)it may say abc.com is an alias of another domain xyz.com i.e abc.com->cname to xyz.com hence now query goes for xyz.com….and returns the IP of xyz.com
d)i don’t know !!! yes d) is an result of DNS misconfiguration.hence we get IP for abc.com thus enabling our system to start transferring data using TCP as protocol.
Example 2
what happens when u send mail at user@abc.com
here again a DNS query is generated BUT from smtp servers of the email provider.
its AIM is to resolve abc.com and get the MX or Apex A record…(only in case MX is absent)
1.ur smpt server will resolve abc.com as per the same pattern as described in above example 1
2.finally when the DNS query (generated by the smtp servers) reaches the Authoritative nameservers of abc.com it asks there for MX record as per the priority they r returned.
now e.g if it returns MX as mx1.hostedmail.emailhost.com then this emailhost.com is further resolved and so on until the email provider gets the IP of receiving servers.
after getting IP of recieving servers the sender’s mails servers transfers the data following SMTP as protocol.