Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

How can I host a website from my home machine? I have a DynDNS address so that even if my external IP changes, the machine is accessible.

Lets say, for example, the machine is accessible at (this is a free service from DynDNS). I've registered a domain name for my website from GoDaddy. Let's say that domain name is

Right now, I've forwarded port 80 so I can enter from anywhere and I can see whatever I've hosted at my homebox.

How can I make it so that, when I enter, I see the same thing? I want to see what I host on my home machine out on the internet via

share|improve this question

migrated from Mar 8 '12 at 23:54

This question came from our site for computer enthusiasts and power users.

There should be an option from your domain registrar to let the domain point to something else, in this case your DynDNS address. –  slhck Mar 8 '12 at 19:35
Do you mean forwarding? so when someone says, they are taken to ? –  hari Mar 8 '12 at 19:39
Personally, I don't like adding unnecessary hops if it can be avoided. You should be able to point your domain to the IP address of your home router. If your ISP provides a Static IP address then this would solve your problems. If not, you could always ask your ISP what the lease time of the IP addresses are and then ask if they have sticky ip addresses. Personally, I've swapped service packages, modems, and routers and never lost my IP address since it is a Sticky Dynamic IP. –  kobaltz Mar 8 '12 at 22:03

3 Answers 3

up vote 7 down vote accepted

Add a cname record to the DNS record for your domain, pointing from to I've only ever used one domain registrar (not Godaddy), but they have a neat web interface where you can update the DNS record.

Raw example:

Working example is provided, at least using Google's nameservers.

Edit (twice):

If you wanted to work too, you must add a second entry from to This might be done by forwarding, I don't know if that's standard or not.

share|improve this answer
Thanks Eroen. I do not want anyone to ever see in their address-bar or anywhere else. is that possible? –  hari Mar 8 '12 at 19:47
Sure, as long as the web server claims to be and does not redirect to –  Eroen Mar 8 '12 at 19:52
Thank you! I've just made this change. Let it propagate! I will report back. –  hari Mar 8 '12 at 20:05
I don't know if you mean in the DNS record or on your computer, but if it works for the first case, you will likely break something if you change it. In the second case, you probably want to use Godaddy's servers while you are changing stuff, so you won't have to wait for caches to be refreshed before testing. –  Eroen Mar 8 '12 at 21:35
Think of the nameserver records for your domain as the thing that advertises where your DNS records are. If you change your nameservers then the records on godaddy will do nothing, so you'd have to enter those records at the location you set the name server to. –  ridogi Mar 8 '12 at 21:49

Finally i know What is the problem ? For me My ISP block port 80 and 8080 So i configure My Website to work with another port For Example :


1- I register for 14 Trial Days in Dyn Standard Dns

2- I configure my domain with the DNS from dyndns

3- I create anew WebHop to forward my Domain To My DynDns Domain For Example

Host-name  :    

Service    : WebHop 

Details    : 
share|improve this answer

Assuming you have a server running Linux, and you are looking to update a DNS A record with the IP of your home server on DNS hosted by GoDaddy, you could do the following on the home server. Note that it my violate your EULA. Be sure that you follow the rules!

  1. Install Python2.7 (it is likely already installed).

  2. Place the following file at /config/scripts/ It is the part that does the actual work of updating godaddy using the pygodaddy library. It will update all domains associated with your godaddy account. It will set an A record for the '@' subdomain wildcard. You can edit this, if you want to specify alternate subdomains. You must also replace '@USERNAME@' with your godaddy username and '@PASSWORD@' with your godaddy password.

    #!/usr/bin/env python
    import logging
    import pif
    import pygodaddy
    # Original Source:
    # Modified by Jeremy Sears (
    logging.basicConfig(filename='godaddy.log', format='%(asctime)s %(message)s', level=logging.INFO)
    # the "requests" library logs noisily, so turn that off                                                       
    logging.debug("DEBUG:   Running");
    client = pygodaddy.GoDaddyClient()                       
    success = client.login(U,P)                              
    if success:                                                                                      
            logging.debug("DEBUG:   Successfully logged in.")                                        
            logging.error("ERROR:   Failed to log in to with username: '{0}'.".format(U))
    for domain in client.find_domains():                                            
            logging.debug("DEBUG:   Looking up DNS Records for {0}.".format(domain))           
            dns_records = client.find_dns_records(domain)                                      
            public_ip = pif.get_public_ip()                                                    
            logging.debug("DEBUG:   Domain '{0}' DNS records: {1}".format(domain, dns_records))
            logging.debug("DEBUG:   Current Public IP '{0}'.".format(public_ip))
            if len(dns_records) == 0:                                                                  
                    logging.debug("DEBUG:   No existing DNS records found.")                           
                    logging.debug("DEBUG:   Existing IP in DNS is '{0}'.".format(dns_records[0].value))
            if len(dns_records) == 0 or public_ip != dns_records[0].value:                      
                    logging.debug("DEBUG:   Updating A record for domain '{0}'.".format(domain))                                  
                    success = client.update_dns_record("@."+domain, public_ip)                                                    
                    if success:                                                                                                   
                  "INFO:     Domain '{0}': Successfully set public IP to '{1}'.".format(domain, public_ip))
                            logging.error("ERROR:   Domain '{0}': Unable to update public IP to '{1}'.".format(domain, public_ip))                         
          "INFO:     Public IP A record DNS record for domain '{0}' is up to date, and does not need to be updated.".format(domain))
  3. Run sudo chown root /config/scripts/

  4. Run sudo chmod u+x /config/scripts/
  5. Place the following file at /config/scripts/ This is a wrapper script that sets up a virtualenv to isolate the libraries used by the python script. It then invokes the above python script.

    # Original Source:
    # Modified by Jeremy Sears (
    ROOT_DIR=$(dirname $0)
    if [ -n "$1" ] ; then
    mkdir -p $WORKING_DIR
    if [ ! -d .venv27 ] ; then
        curl -O
        tar xvfz virtualenv-1.9.tar.gz
        python virtualenv-1.9/ .venv27
    source .venv27/bin/activate
    pip install -q --upgrade pif pygodaddy
    cd $OLD_PWD
  6. Run sudo chown root /config/scripts/

  7. Run sudo chmod u+x /config/scripts/
  8. Place the following file at /etc/cron.hourly/run_godaddy_ddns (no file extension). This will call the script each hour.

    exec /config/scripts/ $WORKING_DIR     
    exit 0                                                
  9. Run sudo chown root /etc/cron.hourly/run_godaddy_ddns

  10. Run sudo chmod u+x /etc/cron.hourly/run_godaddy_ddns
  11. Logs will be written to godaddy.log in the /var/local/godaddy_ddns directory. This directory can be changed by editing the run_godaddy_ddns script.
  12. Place the following file at /etc/logrotate.d/godaddy_ddns (no file extension). This will ensure that your log file doesn't fill up your disk, by rotating the log file. If you changed the logging location, you will need to edit the log file location.

    /var/local/godaddy_ddns/godaddy.log {
        rotate 12
        maxage 365                                                       
  13. You will also need to add a CNAME record in the GoDaddy domain manager to point 'www' to '@'

Security Note: You probably should edit the run_godaddy_ddns script and su to a user other than root, so that the script is run with more limited permissions.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.