Getting Started

Forwarding a site

If you haven’t already, you’ll need to install Forward.

Once the Forward extension is installed in your browser, pull up your local dev site in your browser, then click on the Forward icon.

Chrome forward url icon

Note: If it’s your first time using Forward you’ll need to log in with your Forward account.

To get a link to your local site, click the ‘Start tunnel’ button. A tunnel will open, and the URL will be copied to your clipboard.

Chrome forward start button

Share this URL with anyone you’d like, and they’ll be able to load your local site in their browser.

Im link

Choosing a specific subdomain

When you start a tunnel, if you don’t have any other tunnels open, you’ll get a URL that looks something like yourcompany.fwd.wf. Then, if you start additional tunnels, their URLs will have a random prefix added (like o5z-yourcompany.fwd.wf).

Instead of having a random prefix (or no prefix at all), you also have the option to set a specific, custom prefix for each tunnel (e.g. projectname-yourcompany.fwd.wf).

Before starting your tunnel, click the ‘Change URL’ button.

Chrome forward change url password

On the screen that appears, select ‘Custom subdomain’. Enter the prefix you want to use and click ‘Okay’.

Chrome forward set subdomain

Now click ‘Start tunnel’ to start your tunnel using the custom subdomain.

Using your own domain (CNAME)

You can use your own domain for your tunnels instead of example.fwd.wf. To do so, you’ll need to add a CNAME record to your DNS configuration that points to your Forward subdomain (e.g. yourcompany.fwd.wf.).

Once you’ve done that, you can click the ‘Change URL’ button and then select ‘Your own domain’ and enter the domain you’d like to use.

Click ‘Start tunnel’ to start your tunnel using your CNAME.

Password-protecting your tunnels

Since your Forward URL is accessible to anyone with the URL, there is a small risk that someone might access it who shouldn’t. For cases when you want to be sure that your local dev site is only viewed by people who are supposed to view it you can enable password-protection.

Before you start your tunnel, click 'Set password'.

Chrome forward change url password

On the screen that appears, enter a username and password and click ‘Okay’.

Chrome forward set password

You should now see the username and password below the tunnel URL. Now click ‘Start tunnel’ to start your password-protected tunnel. When you share the URL with someone, they will need to enter the username and password you set in order to view the site.

Chrome forward with password

If you find yourself setting a password often, you can set your tunnels to be password-protected by default. To do this, log in to forwardhq.com and go to ‘Preferences’. Now check the box next to ‘Automatically password-protect my Forwards by requiring a username and password to view them’ and enter a default username and password. Any tunnels you create with that preference enabled will have this username and password set on them.

After you’ve set a default username and password, you may still want some of your tunnels to not be password-protected. To disable password-protection for a specific tunnel, click the ‘Remove’ button next to the password on the tunnel setup screen.

Forwarding a site

If you haven’t already, you’ll need to install Forward.

Once Forward is installed, you can start forwarding your webservers running on localhost. For instance, if you had a Rails server on port 3000, you could Forward it with the following command:

forward 3000

Note: You don’t need to type the $ symbol.

The Forward client will then give you a URL. Share this URL with your client, coworkers, or friends, and they’ll be able to open it in their web browser, allowing them to browse your local development site.

Virtual Hosts

If you’re using Pow, MAMP, or another setup that uses virtual hosts, you can substitute your virtual hostname for the port:

forward example.dev

Choosing a Specific Subdomain Prefix

If you have a Solo account, when you start Forward you’ll get a URL like example.fwd.wf. And if you start up a second Forward simultaneously, you’ll get a URL with a random prefix, like o5z-example.fwd.wf. Business and Small Business users will always get Forward URLs that have a random prefix.

The random prefix is fine a lot of the time, but sometimes it’s nice to choose a descriptive prefix that helps you know which Forward URL goes to which project. You can do that like so:

forward 3000 myproject

Using a CNAME for your Forwards

Sometimes the subdomain/prefix just doesn’t cut it and you want to use your own domain/subdomain for your Forward(s). Here’s how to set up a CNAME with Forward:

  1. Pick a subdomain prefix that you’ll use every time you Forward your project, e.g. myproj.

  2. In your DNS settings, make an alias for your Forward URL (in this case myproj-example.fwd.wf) to the CNAME you’d like to use.

  3. When you start Forward, you’ll need to pass in your CNAME with the --cname (or -c) option, as well as the Forward subdomain prefix you chose:

    forward 3000 --cname dev.example.com myproj

Password-protecting your tunnels with Basic Auth

Since your Forward URL is accessible to anyone with the URL, there is a small risk that someone might access it who shouldn’t. For those cases when you want to be sure that your local dev site is only viewed by people who are supposed to view it, Forward provides password-protection.

To password protect an individual Forward URL, use the --auth (or -a) option:

forward 3000 --auth some_username:some_password

If you find that you’re password-protecting most of your Forwards, you can also set a default username and password for your whole account by logging in to the Account section on forwardhq.com, opening the “Preferences” tab, and checking the box next to “Automatically password-protect my Forwards by requiring a username and password to view them.”

Once you’ve set up a default username and password, if you’d like to Forward something without password-protection, you can use the --no-auth option:

forward 3000 --no-auth

Using a Forwardfile to set options for a Forward automatically

We’ve found that we often use the same options over and over again when we Forward each of our different projects. But, it can be tricky keeping up with which options you use with which projects, so we added a new way to set options: a Forwardfile.

A Forwardfile is a short YAML-formatted file that sits in each project folder and specifies all the options that you’d normally pass to the forward command manually. If you’ve set up a Forwardfile for your project, when you’re ready to Forward it, just cd into your project folder and run the forward command:

forward

If you’ve configured all the options you need in the Forwardfile, you don’t have to pass any options to the forward command at all.

Here’s and example Forwardfile with all the options set (but you only need include the options you need):

# Set the port to forward
port: 3000

# Set the host/vhost to forward
host: example.dev

# Set a static subdomain prefix to use
# (e.g. myapp-yourcompany.fwd.wf)
subdomain_prefix: myapp

# Set a CNAME to use
cname: foo.example.com

# Set a username and password
username: foo
password: bar

# Disable auth on this tunnel (useful if you have
# "require authentication" enabled in your preferences)
no_auth: true

Lastly, if you’re using a Forwardfile for a project, but just need to change an option one time, you can pass options to the forward like normal, and they’ll override whatever you have set in the Forwardfile.