How To Change Default Index Page in .htaccess from cPanel? [EASY GUIDE]☑️
Today in this tutorial you will learn about how to change your default index page using htaccess in cPanel. So come let’s find out how to do this- When you enter a URL on your web browser, the server looks for the first page of your website, also called index page. Usually, the default first page of a website are index.html, default.html, or index.php.
When you need a custom name for your index file or want to migrate your website from another and the index page has a custom name, you need to change the default index name.
This tutorial will teach you the process to change the default index page by making some changes in the .htaccess file using the cPanel.
Before beginning this tutorial you can also watch this short video tutorial on How To Change Default Index Page in .htaccess from cPanel
Follow the steps to change default index page name in htaccess via cpanel:
Step::1 Login to your cPanel using your username and password
Step::2 Click on the File Manager icon under FILES section
Step::3 Find the .htaccess file located in the public_html directory.
(If you don’t find .htaccess file then click on Settings from the top right corner to access the Settings menu. Select the Document Root and make sure Show Hidden files(dotfiles) is selected. Click on Save button.) Watch this video to learn how to find hidden (DOT) Files in cPanel-
Step::4 Right-click the .htaccess file and Click on Edit.
It will show up the Edit pop up. Click on Edit button.
Step::5 Add the following line of code in your .htaccess file to configure your index page.
#Custom default index page
Step::6 You can also add more than one file. The server will read the file from left to right. If the server doesn’t find the first one, it will look for another one in the right.
#Custom default index pages
DirectoryIndex welcome.html hello.html welcome.html first.php