GoDaddy Domain + DynDNS
I host a number of servers and applications, including this blog, on my home network. I had a static IP address through my cable provider and my domain name,bunkerhollow.com, was registered with GoDaddy. I use GoDaddy's TotalDNS Control to point my Root ARecord (@) to my static IP. This directs all traffic on any port, using any protocol, to my home network. I then configure my mail MX records and setup various subdomains to use as shortcuts (blog.bunkerhollow.com redirects tohttp://www.bunkerhollow.com/blogs/matt/).
The problem is I'm moving to a new area at the end of the month and the local ISP only offers static IP addresses at the "Business Plan" level. So instead of paying twice what I'm paying now, I've figured out how to achieve the same result using a dynamic DNS service.
Register with a Dynamic DNS Service
- I registered with DynDNS, for free, and acquired a hostname of mddubs.getmyip.com.
- I then setup my network to automatically update my dynamic hostname when my IP address changes. Most routers and firewalls have this functionality built-in and/or most dynamic DNS services provide a Windows Service utility which will run on a desktop and accomplish the same task.
Assign CNAME Aliases in GoDaddy's TotalDNS Control
- In my case, I created some new CNAME Aliases named www, mail, root, and assigned them all tomddubs.getmyip.com.
- Once the changes have been processed, browsing to http://www.bunkerhollow.com will take me to the correct IP address.
After setting up my CNAMES I'm in pretty good shape. There's just one caveat, I must always use a CNAME! This turned out to be a major hassle since I used my domain root (bunkerhollow.com) for just about everything. I had to change all my systems to use new CNAMES (www.bunkerhollow.com, mail.bunkerhollow.com, root.bunkerhollow.com, etc) which all point to the same place, mddubs.getmyip.com.
Once that was straightened out only a single problem remained, browsing to http://bunkerhollow.com failed. And so it should, it's still set to a static IP address which I no longer own. This isn't critical, but I think it's best practice to have http://domain.com and http://www.domain.com always take you to the same place. I accomplished this using a bit of a hack:
Redirect a Root Web Request to the Correct Location
- I setup a free hosting plan for my domain. During setup, I was given the choice to leave my DNS settings unchanged, which I did.
- Once setup was complete, I went to the GoDaddy Hosting Control Panel to obtain the IP address of where my website is located and I set my Root ARecord (@) to this IP.
- Then I uploaded a small index.html file which redirects to the correct website:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Redirecting...</title>
<meta http-equiv="REFRESH" content="0;url=http://www.bunkerhollow.com">
</head>
</html>
没有评论:
发表评论