Using Local Testing with Live

A usage guide to test websites hosted on localhost, staging and private environments.

Test localhost websites

Once you’ve enabled Local Testing, start a Live session, and enter the website address in the remote browser’s address bar (for instance, localhost:3000). Browse as you would on your own device.

Note: Due to security restrictions in Safari (on iOS 10 and above), localhost URLs will automatically change to http://bs-local.com. This lets us load your website assets properly. Remember to ensure that your local server is configured to serve requests from bs-local.com

Test websites hosted on private or internal servers

You can securely test websites hosted on private or internal servers on our remote browsers and devices with Local Testing. To enable this, follow the steps below:

Start a Live session. In the toolbar dock, click on the Local Testing icon and check Resolve all URLs through my network option. This option ensures that all the requests on our remote browsers and devices are routed through your device.

live-localtesting1

Establish the Local Testing connection with a --force-local flag. This ensures that all the requests on our remote browsers and devices are routed through your device.

BrowserStackLocal --key YOUR_ACCESS_KEY --force-local

Learn more about enabling Local Testing with the Local binary here

Test local HTTPS websites

You can test local websites with SSL certificates on our remote browsers and devices through Local Testing.

Once you’ve enabled Local Testing, start a Live session and enter the website address in the remote browser’s address bar (for instance: https://localhost:3000 or https://staging.example.com). Browse as you would on your own machine.

Note: Custom/self-signed SSL certificates cannot be installed on remote browsers and devices. So when you request local websites with a custom SSL certificate, the remote browsers will show a security warning. You can manually bypass it and proceed with your testing.

Test assets served from multiple internal (or public) servers

You can test local websites with assets on multiple internal or public servers, with Local Testing. For example, staging.example.com could have content hosted on assets1.staging.example.com, certain public servers, and assets2.staging.example.com.

Once you’ve enabled Local Testing, the content will render as expected - no changes required. Just enter the website address in the remote browser’s address bar and browse as you would on your own machine. There’s no additional setup required.

Test HTML design folders

You can test your HTML files on BrowserStack, without first hosting them internally or locally with Local Testing.

Warning: This feature is currently not supported through the Local Desktop app on Windows & macOS. So, you’ll have to use the Local binary to use this feature. Learn more about using the Local binary here (by selecting Other Browsers).

To enable Folder Testing, you’ll need to establish the Local Testing connection with an added –folder flag, along with the absolute path of your HTML file.

Command Line
BrowserStackLocal --key YOUR_ACCESS_KEY --folder <absolute_path_to_html_file>

After enabling Folder testing, you’ll need your account’s Local Folder URL. Your Local Folder URL will be formatted as http://YOUR_USERNAME.browserstack.com. This Local Folder URL can only be accessed by BrowserStack remote machines.

You can also find your account’s Local Folder URL by following the steps below:

  1. Log in to BrowserStack and go to your account settings.
  2. Find “Local Folder URL” on the settings page and copy it.
  3. Back in your Live session, paste the Local Folder URL in the remote browser’s address bar.

Next Steps

We're sorry to hear that. Please share your feedback so we can do better






Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback