• Services
    • Web Hosting
    • Reseller Hosting
    • VPS Hosting
    • Dedicated Hosting
  • Domains
  • Features
  • Company
    • About Us
    • Server Locations
    • Affiliates
    • Company Blog
  • Support
  • Client Login
  • Services
    • Web Hosting
    • Reseller Hosting
    • VPS Hosting
    • Dedicated Hosting
  • Domains
  • Features
  • Company
    • About Us
    • Server Locations
    • Affiliates
    • Company Blog
  • Support
  • Client Login
Home/Article/Web Hosting/.htaccess/How to create or edit .htaccess file in cPanel

How to create or edit .htaccess file in cPanel

Written by VernalWeb
May 4, 2020

The .htaccess file contains several directives (instructions) that guide the server how to behave in certain scenarios and directly control your your website functions. There are some common directives like redirects and rewriting URLs that can be found in .htaccess file. There are many scripts and content management systems such as WordPress, Joomla and Magento that add directives to the .htaccess so that all functions can run smoothly. You may need to edit .htaccess file for various purposes.

Today we will show you how to create or edit .htaccess file in your cPanel file manager.

Step 1: Login to your cPanel control panel.

Step 2: Under the FILES section, click on the File Manager option.

file manager
cPanel > FILES > File Manager

Step 3: Go to the public_html folder.

public_html
cPanel > File Manager > public_html

Step 4: Show hidden files from the settings.

Editing existing .htaccess file

Step 5: If you have an existing .htaccess file, you will see in the public_html folder.

Step 6: Right click on the .htaccess file and click on the Edit menu.

cPanel > File Manager > Edit File

Step 7: Open the file by clicking on the Edit button.

Edit File
cPanel > File Manager > Edit File

Now you can write in the .htaccess file whatever you need. Don’t forget to click the Save button in the top right corner.

Creating new .htaccess file

Step 5: Click on the New File option in the top left corner.

new file
cPanel > File Manager > New File

Step 6: Write the file name as .htaccess in the New File Name: field and click on the Create New File button.

cPanel > File Manager > New File > Create New File

Step 7: Now you can write or edit .htaccess file.

You can also create your .htaccess file in your local computer and upload in the file manager.


We hope this tutorial helps you find the perfect solution. If your like our tutorials, definitely you’ll love our support. All VernalWeb hosting plans include 24/7 support from our amazing inhouse support staff. Check out our web hosting plans and have your website migrated today!

Tags:htaccess

Was this helpful?

Yes  No
Related Articles
  • How to Redirect HTTP Requests to HTTPS with .htaccess
  • How to enable hotlink protection using .htaccess Code
  • How to create custom 404 page using .htaccess
  • How to Create SEO Friendly URL Using .htaccess
  • How to create 301 redirection using .htaccess
  • How to force SSL using .htaccess file

Didn't find your answer? Submit Ticket

Latest Articles

  • How to show Hidden Files (.htaccess) in cPanel File Manager
  • Setup a Domain Redirection in cPanel
  • Create a MySQL Database and a User from cPanel
  • Remove page extensions using .htaccess
  • Cron Job Usage & Policy
  • © 2014 - 2025 VernalWeb. All rights reserved.