Hi Everyone! Have you ever dealt with .htaccess files? Hmm ... you know, for example, when you want to convert HTTP to HTTPS you have to write certain code in the .htaccess file. Or for example, if you want to secure a WordPress website, you will definitely encounter this .htaccess file. Then what is this .htaccess file? What does it do and how do I create an htaccess file on cPanel Hosting ? Well, we will explain one by one. Let's check it out! 😀

 

What is an .htaccess file?

The .htaccess file is a "hidden" file that is used for configuration settings and server security. So in this .htaccess file, there are various codes used for setting access rights, directing non-WWW URL addresses to WWW, protecting folders / files, blocking certain IP addresses, protecting website scripts and so on.

Why is the .htaccess file hidden?

Because it is very important and urgent, this .htaccess file is placed "hidden". So that not everyone can access and replace the file. You can imagine if someone is trying to change settings or add certain code in the .htaccess file. Your website might get an error.

How to Access .htaccess File in cPanel?

Well, you can access the .htaccess file on cPanel Hosting through the File Manager menu, KincaiHostingns 😀 Oh yes, because this .htaccess file is hidden, then you have to bring it up first. Want to know how? Please follow the steps below,

1. Login cPanel Hosting

The first step you have to do is login to cPanel. CPanel login can be via https: // domainname / cpanel, according to the email sent from KincaiHosting regarding Hosting Account Information. For those of you who don't know how to log in to cPanel, please read the Easy Way to Login cPanel
Hosting
.

Then, you will be directed to KincaiHosting's cPanel dashboard. In the search field, please write "file manager". Then click the menu.
 

3. Looking for the .htaccess file in the File Manager

Wait a moment then you are directed to the File Manager Menu. In this menu, you can see various files and folders on the hosting. Starting from the public_html folder which is the content of the main domain to various folders that become subdomains. Then, first determine where the arrangement / addition of the code will be carried out. If in the main domain, please click the public_html folder then try to find the .htaccess file there. So if there is, then you just need to do the editing. If not, please click Settingson the top right corner.
create an htaccess file

4. Enable Show Hidden Files

Then you will find several options like the following image. Please check the " Show Hidden Files (dotfiles) " then click Save.
create an htaccess file

5. htaccess file has been found

So, now you can find the .htaccess file on your Hosting.
create an htaccess file

How to Edit (change) .htaccess file in cPanel?

After you find the .htaccess file the next step is to change or add code to it. Please click the file .htaccessthen click Edit.
create an htaccess file
Wait a moment then it will appear as shown below. Please click Edit
create an htaccess file
Wait a moment then an editor appears like an image. So, now you can add certain code to your .htaccess file. When finished, please click Save Changes.
create an htaccess file

How to Create an Htaccess File?

One of the problems that customers often complain about is the absence of an .htaccess file in cPanel Hosting.

"Ma'am, I want to change my URL address to WWW. In the tutorial I have to change the .htaccess file. But, how come there is no .htaccess file in the main domain (public_html folder)? How to make it how? "

So don't worry, Everyone! You can easily create htaccess files through the file manager menu in cPanel. As for how to create an htacess file, namely,

1. Determining the Destination Domain / Subdomain

Before you create a .htaccess file, first determine the domain / subdomain that is being addressed . For example, you want to make changes to the configuration of a website that is on the main domain. That means you have to enter the public_html or root folder. If you want to make changes to a website that is on a subdomain, then please enter your subdomain folder.

2. Creating an htaccess file

After determining the domain / subdomain, then please open it File Manageras shown above. Then click the domain / subdomain folder on the left side of the file manager page. Keep in mind that for the main domain, please select the public_html folder . For example, this tutorial will create a .htaccess file for a website that is on the toko.websitesaya.net subdomain. For that, click the toko.websitesaya.net folder then click File.
create an htaccess file

3. Making .htaccess file has been successful

After that you will find an image like the one below. Please enter the file name. Htaccess then click Create New File. Remember! Add a period (.) In front of the word htaccess. The period is a characteristic of a hidden file.
create an htaccess file
Wait a minute and voila! How to create an htacess file is complete. Htaccess file has been created successfully 😀 You can add or change the code for website configuration on Hosting.
create an htaccess file

Closing

How to create an htaccess file on cPanel Hosting is very easy, right, KincaiHostingns? Now you can create your own htaccess file, access and edit the htaccess file. Oh yes, always be careful KincaiHostingns if you change settings or add code to the .htaccess file. If you're confused, it's best to ask your sysadmin or technical operator first. Or please just contact our Support Team via email or send a ticket. We will be happy to help any of your problems. Thank you for using KincaiHosting's cheap hosting service ! 😀

What is Safelink Asia?

Safelink.asia is a completely free tool where you can create short links. URL security with cryptographic algorithm. Protect your web visitors with a secure link, to avoid viruses, malware, thief, etc. Apart from being free, you get paid! Register now!


Shorten URLs & earn money

So, now you can make money from home, when managing and protecting your links with Safelink Asia. Signup for an account in just 1 minutes. Once you've completed your registration just start creating short URLs and sharing the links with your family and friends. See our proof of payment and publisher rate.


Our partners and network

Here are some of our partners and networks that have collaborated on advertising: 401XD Group, MC Project, Kincai Media, Kartu Nama Digital, SEO Secret Indonesia, Safelink Asia, Media Bisnis, Blackexpo, Adigunawan.net.