How to Create a Custom HTML Login Page on UniFi Controller Guest Portal

Creating a custom HTML login page on a UniFi Controller Guest Portal enhances user experience and branding.

Understanding the UniFi Controller Guest Portal
The UniFi Controller provides a centralized management system for UniFi devices, allowing for seamless monitoring and configuration.
One of the notable features of the UniFi system is the Guest Portal, which enables users to create custom login pages for guest access.
Benefits of a Custom HTML Login Page
A custom HTML login page offers numerous advantages, including improved branding, enhanced user experience, and the ability to showcase specific information.
Custom login pages can also help gather user information and accept terms of service prior to granting Internet access.
Prerequisites for Creating a Custom Login Page
Before diving into the creation of a custom HTML login page, ensure that the following prerequisites are met:
- A UniFi Controller setup and running.
- Basic knowledge of HTML and CSS.
- A hosted web server or cloud service for the custom page.
Step-by-Step Guide to Creating a Custom HTML Login Page
The process of creating a custom HTML login page involves several steps, which are outlined below.
- Design and develop the HTML login page.
- Upload the custom HTML page to a web server.
- Access the UniFi Controller interface.
- Navigate to the Guest Control section.
- Configure the Portal Settings to point to the custom page URL.

Designing Your Custom HTML Login Page
The design of the custom HTML login page should be user-friendly and visually appealing.
Incorporate your brand's colors, logo, and any essential information such as terms of service or privacy policies.
Utilizing CSS for styling can greatly enhance the aesthetics and usability of the page.
Uploading Your Custom Page to a Web Server
After creating the HTML file, it must be uploaded to a web server. This can be a personal server or a cloud hosting service.
Ensure that the server settings allow for public access to the HTML file to enable guests to view the login page.
Configuring the UniFi Controller
With the custom login page uploaded, the next step is to configure the UniFi Controller to utilize this page.
Access the controller's dashboard, navigate to the Guest Control section, and set the portal type to "External Portal Server."
Enter the URL of the hosted HTML login page in the designated field.

Testing Your Custom Login Page
After completing the configuration, it is critical to test the custom login page. Use a device to connect to the guest network and verify that the custom page appears as expected.
Check for proper functioning of all links and forms to ensure a seamless user experience.
DomineTec Tip: Always back up the original UniFi settings before making changes to avoid any potential disruptions.
Understanding the Technical Specifications
Here’s a comparison of the technical specifications that may be relevant for those setting up a custom HTML login page.
| Specification | Description |
|---|---|
| HTML5 Support | Ensure compatibility with modern web browsers. |
| CSS Styling | Utilize CSS for better design and mobile responsiveness. |
| JavaScript | Include scripts for enhanced functionalities, if needed. |
| Image Formats | Use optimized image formats (JPEG, PNG, SVG) for faster loading. |
| Hosting | Choose reliable hosting to maintain uptime and performance. |
Understanding the UniFi Controller Structure
The UniFi Controller utilizes a database that stores user data and configurations, typically hosted on a server running Java. Familiarity with the structure, including the location of the guest portal files, is crucial for customization.
Customizing CSS for Improved Aesthetics
Styling the login page can be achieved by modifying the CSS file linked within the HTML template. Inline styles can also be applied to specific elements for quick adjustments without altering the entire stylesheet.
Using JavaScript for Enhanced Functionality
Incorporating JavaScript can provide dynamic features such as form validation and custom animations. Scripts can be included in the HTML file to enhance user interactions seamlessly.
Testing Across Different Browsers
Cross-browser compatibility is essential for ensuring that the custom login page functions correctly on various platforms. Testing should be performed on popular browsers like Chrome, Firefox, and Safari to identify and resolve any discrepancies.
Implementing Security Best Practices
To safeguard user data, HTTPS should be enforced for the login page to encrypt the transmission of sensitive information. Additionally, consider implementing measures such as rate limiting and CAPTCHA to prevent unauthorized access.
Deploying Changes and Monitoring Performance
Once changes are made, the updated HTML file must be uploaded to the UniFi Controller and the guest portal settings must be refreshed. Performance metrics should be monitored to ensure the login page operates efficiently and meets user expectations.
Understanding UniFi Controller Configuration Files
The UniFi Controller stores configuration files in JSON format, which can be accessed via the UniFi file structure. Familiarity with these files is essential for customizing the guest portal effectively.
Implementing CSS for Custom Styling
Custom CSS can be added to modify the visual appearance of the login page, allowing for brand alignment. Use the `