How to Enable SSI on cPanel Domain?

admin-img By Manvinder Singh

Spread the love

ssi on cpanel
Server-side includes (SSI) lets your website dynamically insert content like headers, footers, or reusable code into your HTML files. This can make website maintenance easier and more efficient. In this guide, you will learn how to enable SSI on the cPanel domain and troubleshoot tips to help you resolve errors if SSI is not working.

What is SSI in cPanel?

Server-side includes (SSI) is a simple scripting language that dynamically enables HTML pages to incorporate content
from other files. Using SSI, you don’t always need to update every page manually.

For instance, if you are trying to edit the header and footer of your entire website, you will need to change one file;
after that, SSI will apply all the changes automatically, making website updates much faster and easier.

Why do you need to enable SSI on the cPanel Domain?

If you handle multiple pages on your website, manually upgrading every page can be time-consuming. Therefore, here is
why enabling SSI in cPanel is vital;

Easily Update Content

Modifying each website page can be time-consuming. Therefore, SSI allows you to easily update a single file that
automatically reflects changes on the entire website.

Performance Improvement

By decreasing unnecessary load times and duplicate content, your website can process requests more effectively.

Fast Managing Website.

As repetitive HTML coding is eliminated, your website remains structured and easier to manage.

Step-by-Step: How to Enable SSI in the cPanel Domain?

Step 1: Log in to cPanel’s homepage.

log in to cPanel’s homepage.

Step 2: Search for the file manager and open it.

log in to cPanel’s homepage.

Step 3: Edit .htaccess

log in to cPanel’s homepage.

  • Navigate to your website’s root directory (e.g., public_html).
  • Check show hidden files (top-right settings).
  • Right-click .htaccess > Edit.
  • Add this line to enable SSI: Options +Includes
  • Save changes.
  • (Example: Editing .htaccess)

Step 4: Create an SSI test file:

In the file manager, create a new file named test.shtml.

Add this SSI command to display the server date:

HTML

#echo var=”DATE_LOCAL”


Copied!

Save the file.

Access the test file and visit https://yourdomain.com/test.shtml in your browser. If the current date appears, SSI is
working!

Troubleshooting Common Issues

If your SSI is not working correctly, you can try these troubleshooting tips:

1. Check for .htaccess Syntax Errors

Even a minor mistake in your .htaccess file can stop SSI from working. Make sure all directives are well formatted and
written. You can utilize an online .htaccess validator to stop any syntax errors immediately.

2. Verify File Permission

Permissions play a vital role. Ensure the server can read your .htaccess file and any files included (like headers or
footers). A permission setting of 644 is recommended for these files.

3. Confirm Hosting Support

Confirm hosting support for SSI, as not all hosting plans support SSI by default, especially if you use shared hosting.
Some hosts turn off specific Apache modules like mod_include for performance and security reasons. If your SSI code is
not processing, connect to your hosting provider and check if mod_include is enabled for your account.

Summing Up

Allowing SSI on a cPanel domain is a simple and effective method for managing and updating multiple web pages in one go.
Following the above-mentioned steps, you can easily enable SSI on cPanel and test your configuration. You can also
successfully implement SSI on your website. If you face any errors, refer to the troubleshooting tips and contact your
provider for more support.

Frequently Asked Questions

Q1. What is SSI in cPanel?

Ans. In simple terms, SSI in cPanel helps you manage and update multiple pages without needing to add them manually. It
is the most effective method for quickly changing and managing numerous pages.

Q2. What is SSI, and how do I activate it?

Ans. SSI is a feature that allows you to insert dynamic content, like headers or footers, into your HTML pages without
editing each file manually. To activate SSI in cPanel, you’ll need to enable it by adding specific directives (like
Options +Includes and Add-Type text/html .shtml) in your .htaccess file and saving your files with the .shtml extension.

Q3. Why should I enable SSI on my cPanel domain?

Ans. Enabling SSI helps you manage your website more effectively. You can change one file, which will be
reflected across all the pages without manually adding it. This is primarily useful for maintaining consistency and
saving time on updates.

Q4. How to configure the domain on cPanel?

Ans. To configure a domain on cPanel, log in to your cPanel account and navigate to domains. Click on domains or add-on
domains and enter your domain name, depending on your setup. You will also set a document root (the folder where your
website files will be stored) and optionally create an FTP account.

Q5. How to add Addon Domains in cPanel?

Ans. In cPanel, go to the domains section and click Add a Domain. Enter the new domain name, create a subdomain and root
directory, and optionally assign an FTP account. Once added, you can upload your site files to the new domain’s root
folder.

Q6. How do I access my domain’s cPanel?

Ans. You can access your domain’s cPanel by visiting yourdomain.com/cpanel or yourdomain.com:2083. Use your hosting
login credentials to sign in and manage your website, emails, files, databases, and more.

Q7. How to transfer the domain to cPanel?

Ans. To transfer a domain to a cPanel-based host, first unlock the domain from your current registrar and obtain the EPP
code. Then, start the transfer process with your new hosting provider. Once transferred, you can manage DNS and site
settings directly from cPanel.

autor-img

By Manvinder Singh

Manvinder Singh is the Founder and CEO of HostingSeekers, an award-winning go-to-directory for all things hosting. Our team conducts extensive research to filter the top solution providers, enabling visitors to effortlessly pick the one that perfectly suits their needs. We are one of the fastest growing web directories, with 500+ global companies currently listed on our platform.