How to setup Basic Authentication with .htaccess
Basic authentication is often used to prevent users from viewing websites before they are published. Basic authentication may also be used for specific files or directories, so make a note of it so you don’t forget.