Hotspot Login Page Template Mikrotik Access
Introduction MikroTik RouterOS includes a powerful Hotspot feature that allows you to authenticate users before granting them internet access. By default, MikroTik provides basic, functional login pages. However, these default pages are plain and lack branding.
.footer background: #f8f9fa; padding: 15px; text-align: center; font-size: 11px; color: #888;
<!-- IMPORTANT: The action URL must point to your hotspot gateway --> <form id="loginForm" action="$(link-login)" method="post" onsubmit="return validateForm()"> <!-- Required hidden fields for MikroTik --> <input type="hidden" name="dst" value="$(link-orig)"> <input type="hidden" name="popup" value="false">
.input-group label display: block; margin-bottom: 8px; font-weight: 600; color: #333; font-size: 14px; Hotspot Login Page Template Mikrotik
.brand p opacity: 0.9; font-size: 14px;
.info-text text-align: center; margin-top: 20px; font-size: 12px; color: #666;
.form-wrapper padding: 30px 25px;
.error-message background: #ffe6e5; color: #d32f2f; padding: 12px; border-radius: 8px; margin-bottom: 20px; text-align: center; font-size: 14px; display: none;
@media (max-width: 480px) .form-wrapper padding: 20px; </style> </head> <body> <div class="login-container"> <div class="brand"> <h1>Guest WiFi</h1> <p>Please login to access the internet</p> </div> <div class="form-wrapper"> <div id="errorMsg" class="error-message"></div>
// Show error if 'err' parameter exists in URL window.onload = function() let err = getQueryParam('err'); if (err === 'true') document.getElementById('errorMsg').innerText = "Invalid username or password. Please try again."; document.getElementById('errorMsg').style.display = "block"; .footer background: #f8f9fa
function validateForm()
.brand background: #ff6b35; padding: 30px 20px; text-align: center; color: white;
.login-container background: white; border-radius: 16px; box-shadow: 0 20px 40px rgba(0,0,0,0.2); overflow: hidden; max-width: 450px; width: 100%; transition: all 0.3s ease; input type="hidden" name="dst" value="$(link-orig)">
<div class="input-group"> <label>Username</label> <input type="text" name="username" id="username" placeholder="Enter your username" required autofocus> </div> <div class="input-group"> <label>Password</label> <input type="password" name="password" id="password" placeholder="••••••" required> </div> <button type="submit">Connect Now</button> <div class="info-text"> By connecting, you agree to our <a href="#">Terms of Use</a> </div> </form> </div> <div class="footer"> © 2025 Your Business Name – High Speed WiFi </div> </div>
button width: 100%; background: #ff6b35; color: white; border: none; padding: 14px; font-size: 18px; font-weight: bold; border-radius: 40px; cursor: pointer; transition: background 0.2s; margin-top: 10px;