Over the last few months I've acquired a few sites. And they are hosted at various places. I want to bring them together to one hosting company for ease of administration. So I've spent a lot of time researching hosts. Filtering through a lot of information on hosts and choosing a good host I am convinced
1. There isn't such a thing as the ideal host
2. More money does not mean better service/more uptime
3. You should have a backup plan.
The backup plan is what this post is about. If all my sites are with one host and they run into major problems at some point (and the host turns off customer communications) I'm pretty stuck. Is there a way I can have a backup host (money is not an issue) and control the DNSes myself so that if my host has a problem I can point everything to another host who has an uploaded copy of all my sites (flat sites, no databases, no forum)? The latest copy of every site is always the one on my hard disk.
Considering I don't know jack about what a DNS is - should I avoid getting into this? I've always tried to separate what I do from what a hosting company does and I refuse to take the responsibility - and technical aggro - of having a dedicated server. But is the changing of the DNS a simple matter. Do I just log into the registrar and change the nameservers and technical contact? Or is there something else I need to do? What if the registrar has a contact email address for me that's at a domain hosted by the non-functioning host? Will this be a spoke in the wheels?
Considering I don't know jack about what a DNS is - should I avoid getting into this?
If you're really intent on learning what you can about domain names, better learn about DNS
as well. Now's as good time as any. ;)
I've always tried to separate what I do from what a hosting company does and I refuse to take the responsibility - and technical aggro - of having a dedicated server. But is the changing of the DNS a simple matter. Do I just log into the registrar and change the nameservers and technical contact?
You definitely can change the nameservers to those of your new provider by logging inside
your domain name account. Just learn how with your current registrar's account manager
or control panel, or contact them for instructions on how to change them.
Usually changing the tech contact to your new hosting provider gives them the privilege to
change your domain's nameservers or edit them, depends on the registrar.
Changing your domain name's nameservers to another set will always result in downtime.
On the other hand, your registrar might offer some kind of DNS service that will allow you
to create certain records, using the registrar's DNS, that'll resolve to your website, email,
even have backups...even if your website and email are hosted by different companies.
One basic DNS record you should know is called an A-record or Address record. This will
associate a name to the server’s IP address, allowing people to utilize easy-to-remember
domain names instead of hard-to-remember IP addresses to connect to a Web site.
For example, if you created 2 A-records where www.yourdomain.com and yourdomain.com
will resolve to IP address 212.12.21.212 which leads to your website, then type either www.yourdomain.com, domain.com, or even its IP address 212.21.12.212 in your browser,
any and all 3 should resolve to your website.
One implication to this is that you can use your registrar's DNS Manager to create as many
A-records as they'll allow that'll all go to your website. So if one A-record is down, you have
others as backups.
Some companies, especially the larger ones, actually do this for 3 reasons: 1) to distribute
server load, 2) to backup one in case another goes down for some reason, and 3) to test
and track any website changes to see what brings the desired results.
What I said here is just basic info. Just search around for more know how.
Or is there something else I need to do? What if the registrar has a contact email address for me that's at a domain hosted by the non-functioning host? Will this be a spoke in the wheels?
Of course, make sure your contact records are updated. Keep your username/account number
and password in a safe place.
One reason to have an updated contact email is so you can request for your password from
the registrar to send to based on the email on record.
You should check out DynDNS or easyDNS for starters.
Here is what I would recommend:
1: Move your primary DNS services to someone other than your web host.
2: Sign up for a secondary DNS server at a geographically disperesed location. Make sure that your backup DNS host is on a network that is served by a different telco/backbone provider.
3: Maintain your DNS records at your primary dns server. Configure your primary DNS server to allow periodic (automated) zone transfers to your secondary DNS host(s).
4: Keep all your domains in one profile at your domain registrar. This way, should you need to update dns records for multiple domains in a hurry, a quick bulk update would do the job instead of having to do so one domain at a time.
Most ISPs/webhosts provide backup DNS services for a very little onetime cost -if any. Have them include your records in their dns for increased redundancy.
If your current dns host is unreliable, you may want to consider lowering your TTL values ASAP while you are exploring offsite DNS service provider options.
datacenter A:
- 6 web servers and 3 DB servers
- 1 master DNS server, zones have TTL=300, 6 IPs per domain
- dyndns.org provides 4 slave DNS servers - they claim 100% uptime for 3 years and I actually believe them / have data to back up their claims.
- all data resides in a mysql DB with a replication setup to the 2 other DBs and an other DB server in datacenter B
- 2 webservers monitor each other and the other servers - if a server goes down: send alerts to pda, if a webserver dies take it out of the DNS load balancing like this:
echo $cmd¦nsupdate -d -k /var/named/K(yourkey).private
with $cmd like:
server ip_of_master_dns_server\nzone your_zone\nupdate delete domain.com. 300 A ip_of_dead_server
datacenter B:
- 1 big backup server rsyncs periodically /etc /usr and other OS setup info, replicates from master DB, serves static cached pages if datacenter A goes down.
I moved a couple times from dc to dc with barely any downtime, adding/removing web servers is pretty simple, doing the same with the DB backend can be challenging sometimes.
Yes, and Yes. And you probably should too ;)
Added: Being on WebmasterWorld, i should really add that there's absolutely no SE benefits to running your own DNS - neither in terms of better ranking nor anything else. All that this DNS stuff does is to make sure your domain(s) always point(s) at the IP you want it/them to point at, regardless of your choice of web host(s). That's all.
You don't have to know any "
echo $cmd¦nsupdate" stuff - all DNS hosts have nice pointy-clikkety interfaces. You'll still have to type in stuff like your IP numbers and domain names and such, but it's really not complicated. A NAME - the IP your domain name should point to (without www)
CNAME - other hostnames/domains, eg www.domain.com, www.vanitydomain.com
MX - for your Mail eXchannge (ie. email, mailservers)
TTL (Time To Live) - how long time will the rest of the internet cache these records
NS(x) - your Name Servers, where (x) is a number, you'll need to have at least two
- that's about all you need to know for starters. Your DNS provider will most likely have either a forum or a tuturial or a support helpdesk or any combination of these.
A little extra reading here:
1) Separate DNS Hosting [webmasterworld.com] (especially #8)
2) Site change of URL [webmasterworld.com] (#17)
3) Moving website to another server [webmasterworld.com] (especially #5, #9)
Using their interface, it takes about 15 seconds to change the IP that a domain points to, so I can change hosts nearly instantly.
Another benefit is that you can add sub-domains for testing purposes. For example, one of my major sites has example.com, beta.example.com, and remote.example.com, and api.example.com, each one points to a different server.
I've been doing it this way for a long time, and I can't imagine ever going back to playing the propagation waiting game again. I used to feel like my ISP's were holding my web sites hostage and now I'm holding more of the cards.