Using the domains feature in
by Andy Sylvester Tuesday, September 20, 2016

The blogging tool has a feature supporting redirection of domains for a weblog. However, there are a few other steps that are needed to use the feature and have a URL that does not contain a port number. This post offers some tips in this area. I am using John Philpin's weblog URL as an example.

1.  Set up an A record

Using your DNS provider, create an A record pointing to the IP address for your server. Here is an example of what it would look like on my provider:


Host record: river

Points to: 123.234.345.456 (fill in the IP address of your server here)

2. Enter command on your server to redirect port 80 to port 1999

The default setup of is that the application runs on port 1999. Enter the following command in a terminal window on your server while logged in as root:

sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 1999

Normally, when you go to a website like, the response comes over port 80. When this command is entered, the server will map port 80 to port 1999. This makes it look like your app is running on port 80, but it is really running on port 1999.


3. Updates to config.json

An addition to config.json is needed to use the domains feature in Here is an example of the text to add to your copy of config.json:

"where": {

       "flUseLocalFilesystem": true,

       "publicPath": "publicFiles/",

       "privatePath": "privateFiles/"


"domains": {

        "": "/users/jgphilpin"


Typical config.json setups should already have the "where" part, I just included it to provide a reference for where to add the domains entry. There is also an example config.json at the reference URL below.


4. Restart your server

After performing steps 2 and 3, you will need to stop your server and start it again.

I have an example server running on (my 1999 editing environment) and the redirected blog at The RSS feed is at

I would be interested in feedback from other users on this topic - let's hear from you!