With an .htaccess file, you shall define how the web server which addresses the requests to your websites have to act in a variety of scenarios. This is a text file with directives that are carried out when someone tries to open your site and what happens next is determined by the content of the file. As an example, you could block a particular IP address from accessing your website, so the server will decline the visitor’s request, or you can redirect your domain name to another URL, so the server will direct the visitor to the new web address. You can also use custom error pages or protect any part of your website with a password, if you place an .htaccess file in the correct folder. Many widely used script-driven apps, such as WordPress, Drupal™ and Joomla™, use an .htaccess file to work correctly.