Hotspot Login Page Template Mikrotik _hot_ Direct
The Threshold: Deconstructing the Mikrotik Hotspot Login Page
At first glance, the Mikrotik Hotspot login page template is a minor utility — a simple HTML/CSS form slapped onto a captive portal. But look closer. It is a digital threshold, a ritual of entry, and a silent contract between provider and user. It is where raw bandwidth meets human intention.
4. Customizable Branding
- Space for logo, business name, and custom background image/color.
- Editable text for terms, support contact, or promotional messages.
- Multi-language support (via URL parameter or separate template files).
Phase 3: Understanding the Mikrotik "Magic" Tags
Mikrotik uses a proprietary parsing engine. If you delete certain code snippets, the login will fail. Do not remove the following tags from your HTML:
-
The Form Action:
<form name="sendin" action="$(link-login-only)" method="post"> <input type="hidden" name="dst" value="$(link-orig)"> <input type="hidden" name="popup" value="true">This tells the form where to send the credentials.
-
The Username/Password Inputs:
<input type="text" name="username" /> <input type="password" name="password" />The
nameattributes must remain exactly asusernameandpassword. -
The Error Message:
$(error)This variable displays errors like "Invalid Password" or "User already logged in".
-
The Trial/Free User Link (Optional): If you have a trial user setup, the link usually looks like this:
<a href="$(link-login-only)?dst=$(link-orig-esc)&username=$(username)&password=$(username)">Click for Free Access</a>
Advanced Features
Option A: Direct Upload via Winbox (Easiest)
- Open Winbox →
Files. - Navigate to
/hotspot/directory. If it doesn’t exist, create it. - Drag and drop your
login.html,style.css, andimg/folder. - Ensure the file names match exactly (case-sensitive).
- In
IP → Hotspot, select your server profile and setHTML Directorytohotspot.
10) Minimal checklist before deployment
- Include required hidden fields and pass-through query params.
- Ensure redirect (dst/href) handling works reliably.
- Validate and escape any echoed user-supplied values.
- Serve over HTTPS if possible.
- Test voucher, social-login, and timeout scenarios.
- Verify mobile/responsive layout in captive-portal environments.
If you want, I can:
- produce a ready-to-deploy HTML template (RouterOS-compatible) tailored to a specific RouterOS version,
- generate a mobile-first CSS theme,
- or create a small JS snippet that safely handles redirects and displays status messages. Which would you like?
A MikroTik Hotspot Login Page Template is the "face" of your network, acting as a captive portal
that requires users to authenticate before gaining internet access. These templates are essential for venues like cafes, hotels, and schools
to manage bandwidth, collect user data, and display branding or advertisements. Why Customize Your Login Page? Hotspot Login Page Template Mikrotik
Using a custom template instead of the default MikroTik page offers several professional advantages: Branding & Marketing
: You can insert company logos, custom background images, and marketing banners to align with your corporate identity. User Data Collection
: Templates can be modified to collect emails or phone numbers for future SMS or email marketing campaigns. Monetization
: Venues can display unclosable ads or redirect users to specific promotion pages before they connect. Enhanced UX : Modern templates are often responsive
, meaning they automatically adjust to look professional on both desktop and mobile screens. MikroTik community forum Essential Template Files
A complete MikroTik hotspot folder typically includes these core HTML files: login.html Space for logo , business name, and custom
: The primary page where users enter their username and password. redirect.html
: Automatically sends users to the login page if they try to browse the web before authenticating. status.html
: Displays the user's current session info, such as remaining time or data usage. logout.html : Shown when a user manually disconnects from the hotspot. Images & CSS folders
: Contain the visual assets (logos, backgrounds) and styling code that define the page's look. How to Apply a New Template Hotspot customisation - RouterOS - MikroTik Documentation
Part 3: Anatomy of a Standard MikroTik Login Form
To work correctly, your custom login.html must send specific variables to the router. Here is the fundamental structure MikroTik expects:
<form name="login" id="login" action="$(link-login-only)" method="post"> <input type="hidden" name="dst" value="$(link-orig)"> <input type="hidden" name="popup" value="true"><label>Username</label> <input type="text" name="username" placeholder="User or Voucher Code"> <label>Password</label> <input type="password" name="password" placeholder="Password"> <button type="submit">Log In</button>
</form>
Option B: Using an External Web Server (High Traffic)
For large deployments, store templates externally and redirect.
- Set
Hotspot → Server Profile → Login By = HTTP PAP - Set
Hotspot → Server Profile → Hotspot Addressto your external server URL. - The external server must mimic the POST structure to the MikroTik router’s IP.
6. Redirect After Login
- Ability to send users to a specific URL (e.g., your website, social media, or the page they originally requested).
- Controlled via
$(link-orig)or a hidden inputdst.

