Aug 26, 2025
0
Level 1
Password-protecting a subdomain
I've got a site, example.com, in Laravel Forge, that allows wildcard subdomains, e.g subdomain1.example.com and subdomain2.example.com.
Within my server on Forge, I've set up a single site, and I want to set up basic password protection, however I only want to password-protect one of my subdomains, I want the others to be publically accessible.
How do I do this?
In the Laravel UI, under "Security" I've added the route I want to protect to be subdomain1.example.com/* but this doesn't work. Is this possible to do via the Laravel UI, or do I need to amend the nginx config on the server?
Please or to participate in this conversation.