[ Resolved ] Custom 401 Page

I understand there is a custom 404 page for when a link, page, or a directory is not available or is inactive.

I have added a password protection to my website and noticed through the dev tools that the page sends the error 401 [ Unauthorized ], and was wondering if it was possible to create a customized 401 page so that when users come to the site, they know it is in development.

It would basically allow users to know the page is not ready, with information, and allow authorized users to view the website before it’s completely published.

Thank you for reading!
Kind regards, GregoryAM

You can create a page called 401.html and add the following to your .htaccess file

ErrorDocument 401 /401.html
1 Like

Will this work while hosting with BSS? I am connected to CloudFlare, and from my understanding I saw on the forum that it isn’t possible to add a .htaccess file to BSS through the editor. I did forget to add that part to the main message.

edit: realized I basically answered my own question on creating a 401 page.

1 Like

No access to .htaccess on the bss servcers. A work around would be to have a holding page (under construction) on your main site and then do your development on a xxxxx.bss.design

I appreciate that. I realized after doing some digging! I also seemed to have answered my own question by saying, “I saw on the forum it isn’t possible to add a .htaccess file to BSS through the editor”. Which I still baffled myself by posting this question. :sweat_smile:

I really appreciate the help! I plan on making a redirect via the META tags to a specific page, or a subdomain I use. If that doesn’t work the best for me; I’ll probably keep the password protection on it until the website is complete, or find a way to add JavaScript for a login page and use a obfuscator to mask data.

If security is not a major concern, and you’re just looking for simple password protection to keep casual users out of your website, this is a pretty nice little tool…

1 Like

I checked the website out and this actually might be what I’m looking for!
I appreciate you for finding a fix to this small issue I was facing.
Thank you, @printninja!