Preparing for Publishing to Your Computer
Sandvox allows you to publish a site to your computer. However, getting everything properly set up for people visiting your site over the internet can be tricky.
Every computer on a network has an IP address. This is a number that defines where on the network the computer is. To access a site published on your computer, people need a way of getting an IP address that uniquely identifies your computer on the internet.
There are two basic possible ways in which your computer could be connected to the internet. In either case, you will need to know the IP address through which you are connected to the internet.
To find the IP address for your internet connection, visit http://whatismyip.com
Direct Internet Connection

(The address shown is just an example)
This is the simplest case and is usually only found in homes where a single computer is connected to the internet. This makes publishing to your computer simpler since it is directly contact-able from the Internet.
Internet Connection Through a Router

(The addresses shown are just examples)
This configuration is more common, since it allows multiple computers to share the same internet connection.
Your computer has an IP address on the internal network, but not one that is directly accessible from the internet. The router is the only device with an external IP address that can be contacted from the internet. Thus, you must instruct the router that any requests for web pages should be passed onto your computer. This is known as port forwarding.

To set up port forwarding for webpages:
- Open System Preferences on your computer.
- Go to the "Network" preference pane.
- Double-click the interface you are connected to the internet with.
- Go to the "TCP/IP" tab. Take note of your IP address and the address of your router there.
- Consult your router's manual for how to set up port forwarding. Configure the router to forward port 80 to the IP address of your computer.
Dynamic DNS
For people to visit your site, they must know the IP address of your computer. This is not a problem if your ISP (Internet Service Provider) has issued you with a static IP address. However, many ISPs issue dynamic IP addresses. This means the IP address of your internet connection can change at any time.
To compensate, a service such as Dynamic DNS can be used. You are given a unique hostname which is used to access your computer and websites. The service keeps track of your IP address and automatically ensures that visitors are pointed to the correct location.
The sequence of events looks something like this:
- Visitor enters your hostname. e.g. http://example.com
- Dynamic DNS service looks up the current IP address for that hostname. Passes request onto that address.
- Your computer receives the request and serves the appropriate webpage.
Web Sharing
For your computer to serve webpages, you must be running a web server. The easiest way to do this is to use OS X's Web Sharing feature.
To enable Web Sharing (OS X 10.7 and earlier operating systems):
- Open System Preferences.
- Go to the "Sharing" pane.
- Go to the "Services" tab.
- From the list of services, check the "Personal Web Sharing" box.
To enable Web Sharing (OS X 10.8 and up):
Personal web sharing is possible, but it can no longer be controlled directly from Apple's preferences. You can download and install this preference pane for controlling web sharing from Tyler Hall to enable web sharing.
Keywords: publish, publishing, computer, published, local, locally, dynamic, dns, dyndns, network, networks, internal, lan, port, ports, forward, forwards, forwarding, router, routers, routing, nat, prepare, prepares, preparing, require, requirements