Performance Optimization

Website Speed Optimization

By the Domain India teamPublished 5 min read
Knowledge base article
Contents (4 sections)

Website speed optimisation means finding where the load time goes and fixing that, rather than applying every tip at once. Measure first, fix the server side if the first byte is slow, then make the page lighter. This page is the quick checklist; the full diagnosis guide is linked below.

For the full guide

The step-by-step diagnosis, including resource limits, slow plugins, database queries and external calls without timeouts, is in My website is slow. Start there if your site is slow right now.

Key takeaways

Test the slow page in PageSpeed Insights or WebPageTest and look at the time to first byte (TTFB). A slow TTFB points to PHP, plugins, the database or your account's resource limits; a fast TTFB with a slow page points to images, scripts and caching. On Domain India shared hosting the web server is Apache, gzip compression is already on, and OPcache is enabled on our cPanel servers, so the biggest wins are usually a current PHP version, one Apache-compatible caching plugin and smaller images.

1. Measure before you change anything

Run the slow page through PageSpeed Insights or WebPageTest two or three times, or open your browser's DevTools (F12) › Network and reload. Note the TTFB as your "before" number.

2. The quick-win checklist

Use a current PHP version
Newer PHP 8 releases are faster and still get security fixes. Pick the newest version your site supports, after a backup, and test key pages.
Add one page-caching plugin
Our shared hosting runs Apache, so use WP Super Cache or W3 Total Cache on WordPress. Keep only one caching plugin active.
Compress and resize images
Upload images at the size they are shown and serve WebP or AVIF where your CMS supports it.
Cut scripts and fonts
Remove unused sliders, widgets and tracking tags, and load non-critical scripts with defer or async.
Set browser caching
Let repeat visitors reuse images, CSS and JavaScript (see section 3).
Consider a CDN
Cloudflare's free plan serves static files from locations near your visitors.

3. What is already done for you on Domain India

FeaturecPanelDirectAdmin
Web serverApache, with nginx in frontApache
Gzip compressionOn for every site (nginx)On server-wide (mod_deflate)
OPcacheEnabledEnabled, except on PHP 8.3
PHP versions offeredUp to 8.5Up to 8.3
Browser caching modulesmod_expires and mod_headers loadedmod_expires and mod_headers loaded

Because compression is already on, you don't need a gzip rule in .htaccess; check that pages arrive with Content-Encoding: gzip as described in How to enable gzip compression in cPanel. Brotli is not offered.

OPcache keeps compiled PHP code in memory. It is a server setting, so there is nothing to switch on in your account; to confirm it for your PHP version, use the ini_get() check in the PHP OPcache guide. On DirectAdmin, PHP 8.3 runs without OPcache, so an earlier supported PHP 8 version may be faster there.

Browser caching is the one thing worth adding yourself, if your caching plugin doesn't already. Put this in the .htaccess file in your site's folder:

apache
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType image/webp "access plus 1 month"
  ExpiresByType image/jpeg "access plus 1 month"
  ExpiresByType image/png "access plus 1 month"
  ExpiresByType image/svg+xml "access plus 1 month"
  ExpiresByType text/css "access plus 1 week"
  ExpiresByType application/javascript "access plus 1 week"
  ExpiresByType font/woff2 "access plus 1 year"
</IfModule>
Don't copy old php_value tweaks

Our servers run PHP through PHP-FPM or CGI, not as an Apache module, so a php_value or php_flag line in .htaccess causes a 500 error. Change PHP settings through your control panel's PHP options instead.

On cPanel, nginx also caches successful responses for a short time. When you test a change, add ?t=1 (any value) to the address so you see a fresh copy.

4. When the fix is a bigger plan

Upgrade only when your resource usage shows regular faults after you have fixed slow plugins, queries and external calls. In cPanel, check Metrics › Resource Usage; see Check your hosting resource usage. There is no Redis or Memcached on shared hosting, so sites that need an object cache, or server-level tuning, belong on a VPS. For how to move up a plan, see Can I upgrade my web hosting package?

cPanel Growth
₹200/mo + GST
  • 50 GB NVMe SSD Storage
  • 100 GB Monthly Bandwidth
  • 5 Websites
  • 50 Email Accounts
See plan details
VPS Starter
₹552.65/mo + GST
  • 1 vCPU
  • 2 GB DDR4 RAM
  • 64 GB NVMe SSD Storage
  • 2 TB Monthly Bandwidth
See plan details

Prices on the cards exclude 18% GST.

How do I make my website faster on Domain India hosting?

Measure the slow page first with PageSpeed Insights or WebPageTest. Then use a current PHP version, one caching plugin such as WP Super Cache or W3 Total Cache, smaller images and fewer scripts. The full diagnosis steps are in the My website is slow guide.

Do I need to enable gzip compression?

No. On Domain India cPanel hosting nginx already gzips text files for every site, and DirectAdmin servers compress with mod_deflate. Brotli is not offered.

Is OPcache enabled?

Yes on our cPanel servers. On DirectAdmin it is enabled for every PHP version except PHP 8.3. It is a server setting and can't be changed from a shared hosting account.

Should I use LiteSpeed Cache?

No. Domain India shared hosting runs the Apache web server, not LiteSpeed. Use an Apache-compatible caching plugin such as WP Super Cache or W3 Total Cache.

Ready to speed things up? Work through My website is slow, or open a ticket with the slow page's URL and your test results.

Still slow after these checks?

Send us the slow page's URL, when it happens and your test results, and we will check your account's resource usage with you.

Open a support ticket

Was this article helpful?

Your answer helps us decide what to improve next.

Still need help? Open a support ticket and our team will reply.

Prefer an app? Add this site to your home screen.Get the app