The best way of creating a .htaccess file is by using a plain text editor. For example, you can use Microsoft NotePad on your local machine then upload it to your web hosting server. Alternatively, most web hosting file managers will also allow you to create plain text files.