“.htaccess” is a file supported by almost all the web servers today. It is placed in the root directory without a name and with the “htaccess” extension. It is used for many purposes like for authentication, redirecting URLs, blocking users by IP address or domain, setting your content’s expiration, for Gzipping your website’s content and many other purposes. This plays a very crucial role in managing your WordPress website too.
What is the Main Problem With .htaccess File
Most of the people know what the .htaccess file is and what it is capable of, but they could not find the .htaccess file. This is because it is hidden by default in the cPanel and you can only see it if you ask the file manager to show the hidden files. We have a tutorial that teaches you how to view hidden files in cPanel and by which you can edit your website’s .htaccess file from the cPanel itself.
But opening cPanel again and again is not a feasible option. So we have two different methods that allow you to view and edit the contents of .htaccess file from the WordPress Dashboard itself.
Editing .htaccess File from WordPress Dashboard using Plugins
We make use of two different plugins to edit .htaccess file. One is the WordPress SEO by Yoast and other one is the WP Htaccess Editor.
WordPress SEO by Yoast
WordPress SEO by Yoast is an excellent plugin for improving the SEO of your WordPress blog. It has options to define the title and meta tags for all type of pages, be it the homepage, post, pages, tags or categories. It allows you to add support for open graph, generate sitemap for your blog, gives you an option to add breadcrumbs in your theme, and also gives an option to add anything before or after each post item in your feeds. And yes, it also allows you to edit the .htaccess files from your WordPress dashboard area. I recommend you to use this plugin because it solves your problem of editing the .htaccess file and side by side it offers so many SEO benefits, which no other plugin is providing till now.
LINK: WordPress SEO By Yoast
TIP Make it a habit of always taking a backup of your .htacess file before editing it. This file is quite powerful and can cause serious problems if you enter wrong codes.
WP Htaccess Editor
If you use some other plugin for SEO or choose not to use any, then you can go with this option. WP Htacess Editor is designed specifically for this purpose. It allows you to edit .htaccess file, and if it’s not present, then it will create it for you. It offers an additional backup feature too, which takes a backup of your original htaccess file whenever you make any change in the file. If everything works fine after editing, you can delete the backup else you can revert back to the original file.
LINK: WP Htaccess Editor