Codex tools: Log in
If you want to host your WordPress blog on a server behind a NAT device you may find it is difficult to setup your blog so it is accessible, both from the Internet, and from the local-area network that sits behind the NAT device. This article details the steps necessary to configuring your computers to access that blog.
First of all, you need to complete the Famous 5-Minute Install process using the Internet domain name that you have picked for your blog. For this example, assume your blog is setup with a domain name of
Next, your domain name should be setup so that it points at the Public IP Address of your ADSL router/NAT device, which in turn, should be setup to forward HTTP requests to your web server.
After those two steps, you should have a WordPress blog that works fine when accessed by domain name from the Internet. However, if you try to access your blog by domain name from your local network, it will not work without further configuration.
In order to enable access to your blog from your local network, you need to perform an extra configuration step on each of the machines in that local network.
Basically, you need to tell all of the local machines to access the local web server directly when they want to view your domain. This is achieved by putting an entry in the
hosts file. Typically, the
hosts file can be found on Windows XP located in the
C:\windows\system32\drivers\etc folder and on Linux located in the
If the web server is running on this machine, you need to edit the entry for
localhost so that it reads as follows:
127.0.0.1 localhost www.example.com
If the web server is running on another machine, for example at IP Address
192.168.0.100 you need to add an entry for
www.example.com as follows: