Every WordPress file is important to run your website properly. The .htaccess (hypertext access) is one of the important files in WordPress core files which will completely change the way your website interact with its server.
Many WordPress users who are hosting their own blog are still unaware of the .htaccess file in WordPress. In this article, I’ll talk about what is .htaccess file and how to find and create the .htaccess file in WordPress.
What is .htaccess in WordPress?
The .htaccess file is a configuration file that gives instructions to your website server on how to handle your website content.
You can override many server configuration settings and enable/disable the new functionality and features through a .htaccess file in WordPress.
What we can do with .htaccess?
- Rewrite the URL’s and make them SEO friendly.
- Redirect visitors from old URL’s to new URL’s.
- Protect your website directories with a password.
- Create a custom 404 pages to show a friendly error page for your website visitors.
- Add a custom maintenance page.
- Improve caching for better speed.
- Allow or deny visitors by IP address.
- Stop image Hotlinking.
Where we can found .htaccess file?
The .htaccess file is not only associated with WordPress but you can also found on any Apache web hosting servers. The .htaccess file usually found in WordPress root folder after installing WordPress on your web hosting server. In some cases, by default .htaccess file stays in hidden mode and your Cpanel or FTP client unable to show your file. To see these files you need to enable show hidden files option in your Cpanel or FTP client.
Let’s check, how to view a .htaccess file.