Most Windows programs do not allow you to save a file if the name starts with a period. Here we will show you how to create an .htaccess or .htpasswd file using Windows.
Using an .htaccess file is common, for tasks such as making an area of your website accessible only to certain visitors.
Open a text editor (for example, Notepad).
Insert the desired code.
Save the file as .htaccess or .htpassword and be sure to select the All files (*.*) option.