Bobcares

How to change default index page in cPanel

by | May 10, 2019

New account creation in cPanel is pretty hassle free. But, things go for a toss when the incorrect website page shows up.

Usually, the wrong page shows up due to wrong domain configuration in cPanel.

And, the website owners often contact us to fix their website as part of our Server Administration Services.

Today, we’ll see on how to change default index page in cPanel.

 

Default index page on new account

Before finding a fix for the problem, let’s have a quick look on how the default page shows up in a website.

In cPanel, upon new account creation, server automatically copies a set of files and folders from the skeleton folder to user’s home directory. This would also include a default index.html file in the public_html folder of the website. By default, this page shows up when you access the new website from a browser.

Usually, users upload contents to their website folder using FTP or cPanel’s File Manager. And, when the domain has incorrect settings, wrong index page shows up.

 

Reasons for showing wrong index page

In many cases, even after uploading the website content to the public_html folder of the website, wrong page shows up. Let’s take a look at the various reasons for this.

 

1. Wrong .htaccess entries

By default, the following rule set in the .htaccess file of the website controls the index page.

DirectoryIndex index.html index.php

The .htaccess file is normally read from left to right and select the first available page. For example, in this case, the web server will look for the index.html file, if it is missing, it will look for the index.php file etc.

However, when the newly designed page has a different name, say home.html, it would never show up as the default page.

 

2. Incorrect file name or path

Again, another reason for incorrect index page showing up on website happens when you forget to overwrite index.php or index.html file during file upload. As a result, the default index page still remains on website and that shows up.

The overwrite option in cPanel’s File Manager looks as shown:

 

Similarly, files in servers are case sensitive. If the index file has a name INdex.php, it do not match index.php file and results in wrong page too. From our experience in managing servers, our Dedicated Engineers often see customers uploading file to the wrong directory. This again causes default index page errors on the website.

 

3. Wrong IP address settings for domain

Often wrong IP address in the web server configuration also create problems with default index page. In such cases, domain’s DNS would take it to the correct server. But, inside Apache, it might be pointing to wrong IP. As a result, it will show the default cPanel index page.

 

How we set proper index page for website

We just saw the various reasons for the index page problem on the website. Now, let’s see how our Support Engineers fix it.

 

1. Verify domain IP

We begin investigation by checking whether the website resolves correctly to the server. Then, we confirm the IP address set in the Apache configuration file httpd.conf

In case of mismatch, we edit the configuration file and set it to the correct IP address.

 

2. Ensure index file exists

When the IP address settings are correct, we check the presence of index file in the document root of the website. For instance, in cPanel, it should be present in the public_html folder.

When users upload files to the sub folders, we copy the files to the correct folder. Additionally, we set the correct name for the index file, set proper permissions, etc.

 

3. Modify .htaccess

In some cases, we may need to modify the .htaccess file to point to the correct index file.

If the newly designed home page of the website is welcome.html, we set the public_html directory .htaccess entry as:

DirectoryIndex welcome.html

To edit the .htaccess, we either use the command line editor in SSH or cPanel’s File Manager. The edit page in File Manager looks as shown.

That fixes the problem and correct file shows up as the default index page of the website.

[Trouble seeing correct page on your website? We can make it working.]

 

Conclusion

In our vast server administration experience, wrong index page shows up due to many reasons like missing files, incorrect website settings, etc. Today, we saw the top reasons for index page errors and how to change default index page in cPanel.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

1 Comment

  1. Rahul kumar

    thanks for help this article is also helpful

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF