Important: Free Tier signup is temporarily disabled for new users June 7th - June 16th

How to set up and customize a UniFi Captive Portal

Published onby Iron (edited on )

Want to control how guests access your network? You've come to the right place. A Captive Portal is a great way to do it. With the UniFi Captive Portal, you can create a branded login page and manage guest access. It's also a great way to help keeping your network secure.

Let me show you how to set this up and customize step-by-step.

Let's go!

Table of Contents

Setting up a UniFi Captive Portal

I feel that I don't need to explain anymore what a Captive Portal is so let's get right to it. To set up a Captive Portal on your UniFi network, follow these steps:

Access the UniFi Controller

Log in to your UniFi Controller via your web browser. The Controller’s dashboard will provide an overview of your network and devices.

Create a guest network

  1. Navigate to the "Settings" section and select "Wi-Fi".
  2. Click "Create New Wi-Fi Network".
  3. Enter a name for your guest network (e.g., "Guest Wi-Fi").
  4. Under "Network", select "Guest" as the purpose.
  5. Configure other settings as needed (e.g., security options, VLAN ID).
  6. Click "Apply Changes".

Enable the Captive Portal

  1. Go to "Settings" > "Guest Control".
  2. Toggle "Enable Guest Portal" to ON.
  3. Under "Authentication", select the method you prefer:
    • No authentication: Users will only see the splash page.
    • Simple password: Users must enter a password.
    • Hotspot: Users must enter a voucher code or login credentials.
  4. Customize the "Redirect URL" if you want users to be redirected to a specific webpage after logging in.

Customize the splash page

  1. In the "Guest Control" section, click on "Customize Portal".
  2. You can use the built-in editor to modify the splash page or upload your own HTML file for full customization.
  3. Add your company logo, welcome message, and terms of service to give the portal a branded look.
  4. Save your changes.

Adding some advanced customization

For more advanced customization, you can integrate third-party services or use the UniFi API (which isn't always great to be honest).

This allows you to create dynamic portals that can interact with external databases, provide personalized content, or integrate with marketing tools.

Example: Customizing with HTML and CSS

If you choose to upload your own HTML file, you can create a fully customized splash page. Here’s a basic example:

<!DOCTYPE html>
<html>
<head>
    <title>Welcome to Our Guest WiFi</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            text-align: center;
            background-color: #f4f4f4;
            padding: 50px;
        }
        .container {
            max-width: 600px;
            margin: auto;
            background: white;
            padding: 20px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        h1 {
            color: #333;
        }
        p {
            color: #666;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>Welcome to Our Guest WiFi</h1>
        <p>Please agree to the terms of service to connect.</p>
        <form action="/guest/s/default/">
            <input type="hidden" name="cmd" value="authenticate">
            <button type="submit">Connect</button>
        </form>
    </div>
</body>
</html>

Upload this HTML file to your UniFi Controller, and it will be used as the splash page for your guest network.

Monitoring and managing guest access

Once your Captive Portal is set up, you can monitor and manage guest access through the UniFi Controller:

  1. View connected clients: Go to the "Clients" section to see a list of all devices connected to your guest network.
  2. Generate reports: Use the "Insights" and "Statistics" sections to generate reports on guest network usage.
  3. Manage sessions: You can disconnect clients, extend session times, or generate vouchers (if using the Hotspot method).

Final Thoughts

Setting up a UniFi Captive Portal is a straightforward process. It's a great way to manage guest access.

Whether you opt for a simple setup or a fully customized solution, a Captive Portal improves network security and provides valuable insights into network usage.

If you need setting this up, we can help. At UniHosted we specialize in in UniFi network management. Let me know if you have any questions! If you would like me to personally walk you through UniHosted, you can schedule a call with me here.

We host UniFi Controllers in the Cloud

Are you ready to take your UniFi Network to the next level? Deploy a UniFi Cloud Controller in minutes and manage your network from anywhere.

Deploy Now

Free tier available

Get the best support

Join 1660+ customers

No credit card required