Gzip compression shrinks text files such as HTML, CSS and JavaScript before the server sends them, so pages download faster and use less bandwidth. On most hosting you have to switch it on. On Domain India cPanel hosting it is already on for every site, so the useful job is to check that your pages really arrive compressed, and to know when an .htaccess rule still helps.
On Domain India cPanel hosting, the nginx proxy in front of Apache already gzips HTML, CSS, JavaScript, JSON, XML and SVG for every site; there is nothing to enable. Our DirectAdmin servers compress with Apache's mod_deflate. Check any page with curl or your browser's Network tab and look for Content-Encoding: gzip. Add mod_deflate rules in .htaccess only if that check shows a text file type arriving uncompressed.
1. What gzip does, and what it does not
When a browser requests a page it says which compression it understands, for example Accept-Encoding: gzip, br. If the server compresses the response, it replies with Content-Encoding: gzip and the browser unpacks it. Text files usually shrink by 60 to 80 percent.
Compression helps text: HTML, CSS, JavaScript, JSON, XML, SVG and plain text. It does nothing useful for JPEG, PNG, WebP, video, PDF or ZIP files, which are already compressed; servers skip them. So if your pages are heavy because of large images, gzip will not fix that. Resize and convert the images instead; see My website is slow.
2. Domain India cPanel: already on
Our cPanel servers run nginx in front of Apache. Every request passes through nginx, and nginx compresses text responses with gzip before they leave the server. We checked this on 24 September 2026: sites on our cPanel servers returned Content-Encoding: gzip for HTML pages and for CSS and JavaScript files when the browser asked for it, and an uncompressed response when it did not.
| Server type | Is gzip on? | How |
|---|---|---|
| cPanel | Yes, for every site | The nginx proxy compresses HTML, CSS, JavaScript, JSON, XML and SVG |
| DirectAdmin | Yes, for every site | Apache mod_deflate, server-wide, skipping images, media and archives |
| Webuzo | Not measured | Run the check in section 3; ask support if nothing is compressed |
Our servers use gzip. They did not answer with Brotli in our test, even when the browser offered it. If you want Brotli, a CDN such as Cloudflare can add it in front of your site; see Cloudflare setup for Indian websites.
3. Check that your site is compressed
From a terminal
curl -s -o /dev/null -D - -H 'Accept-Encoding: gzip' 'https://yourdomain.com/?t=1' | grep -i -E 'content-encoding|content-type'You should see content-encoding: gzip. Repeat with the address of one CSS and one JavaScript file from your site. The ?t=1 makes sure you get a fresh response rather than a cached copy.
In your browser
- Open developer tools.Press F12 in Chrome, Edge or Firefox and open the Network tab.
- Reload the page.Tick "Disable cache" first so every file is fetched again.
- Click a file.Choose the page itself, then a
.cssand a.jsfile. - Read the response headers.Look for
content-encoding: gzip(orbr, if a CDN such as Cloudflare adds Brotli).
PageSpeed Insights also reports "Enable text compression" if any text file arrives uncompressed.
4. The cPanel "Optimize Website" tool
cPanel has an Optimize Website tool in the Software section, which switches on Apache's mod_deflate for your account. On our cPanel servers nginx already compresses the response, so turning it on does not make your pages smaller. It is harmless if you have already set it; there is no need to change it back.
5. When an .htaccess rule still helps
Add mod_deflate rules to .htaccess only if the check in section 3 shows a text file type arriving without Content-Encoding, for example on a server where compression is not already on, or for a text file type the server does not already compress. Put this in the .htaccess file of your site's folder, such as public_html:
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/css text/xml
AddOutputFilterByType DEFLATE text/javascript application/javascript application/json
AddOutputFilterByType DEFLATE application/xml application/rss+xml application/atom+xml
AddOutputFilterByType DEFLATE image/svg+xml image/x-icon font/ttf font/otf
</IfModule>The IfModule wrapper means the rule is skipped safely if mod_deflate is not loaded. Then run the check again. Leave out .woff and .woff2 fonts: they are already compressed.
Don't copy php_value zlib.output_compression On or php_flag lines from old guides. Our servers don't run PHP as an Apache module, so those lines give a 500 error. Compress once, at the server; PHP-level compression on top of it wastes CPU. For other .htaccess rules, see Mastering .htaccess.
6. WordPress and caching plugins
Caching plugins such as WP Super Cache and W3 Total Cache have their own compression settings. On our cPanel servers, where nginx already compresses, you can leave the plugin's compression option off. Domain India shared hosting runs Apache, not LiteSpeed, so the LiteSpeed Cache plugin's server features do not apply.
If your WordPress site shows a blank page or a 404 on the home page rather than a speed problem, the old version of this article covered restoring index.php; that now has its own guide: How to restore or reset the WordPress index.php file.
7. Other things that make a bigger difference
Gzip is one item on a longer list. Usually the larger wins on a slow site are page caching, image size, fewer plugins and a lighter theme. My website is slow walks through them in order, and Core Web Vitals explained shows how Google measures the result.
8. Where Domain India hosting fits
Domain India cPanel hosting compresses every site automatically, with an nginx proxy in front of Apache and free SSL. The card shows the live price, excluding 18% GST.
- 25 GB NVMe SSD Storage
- 50 GB Monthly Bandwidth
- 1 Website
- 10 Email Accounts
Frequently asked questions
Do I need to enable gzip on Domain India cPanel hosting?
No. On our cPanel servers the nginx proxy in front of Apache already compresses HTML, CSS, JavaScript, JSON, XML and SVG for every site. You can confirm it by looking for Content-Encoding: gzip in the response headers.
How do I check whether gzip is working?
Run curl -s -o /dev/null -D - -H 'Accept-Encoding: gzip' against your page and look for content-encoding: gzip, or open your browser's developer tools, reload the page on the Network tab and read the response headers.
Does cPanel's Optimize Website tool make my site faster on Domain India?
Not noticeably. It switches on Apache compression, but on our cPanel servers nginx already compresses responses before they leave the server. It does no harm if it is on.
Should I add mod_deflate rules to .htaccess?
Only if a check shows a text file arriving without Content-Encoding. Wrap the rules in an IfModule mod_deflate.c block so they are skipped safely, and test again afterwards.
Does Domain India hosting support Brotli?
Our servers answered with gzip, not Brotli, in our tests. If you want Brotli, a CDN such as Cloudflare can serve it in front of your site.
Why are my images not compressed?
Image formats such as JPEG, PNG and WebP are already compressed, so gzip would not make them smaller. Resize images and use modern formats instead.
Ready to speed up your site? Start with My website is slow, or open a support ticket if a check shows your pages arriving uncompressed.
Send us the page address and the headers your check returned, and we will look at the server side with you.
Open a support ticket