“Uncompressed pages” is a common issue flagged during website audits by tools like Semrush. This issue occurs when web pages are not using compression algorithms like Gzip or Brotli to reduce the size of the files sent from the server to the user’s browser. Uncompressed pages can lead to slower page load times, which can negatively impact user experience, search engine rankings, and overall site performance.
Why is it Important to Fix Uncompressed Pages? Faster load times can also improve your site’s SEO, as search engines prioritize quick-loading sites in their rankings. Additionally, compressed pages reduce bandwidth usage, which can lead to cost savings on server resources.
How to Fix “Uncompressed Pages” Detected by a Semrush Audit
Step 1: Confirm the Issue
Before implementing any fixes, verify that your pages are indeed uncompressed. You can use online tools like GIDNetwork or Check GZIP Compression to check if your website’s pages are compressed.
Step 2: Enable Compression on Your Web Server
For Apache Server
1. Access the .htaccess File:
- Locate your .htaccess file in the root directory of your website. If it doesn’t exist, create one.
2. Add the Following Code:
# Compress HTML, CSS, JavaScript, Text, XML and fonts
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
</IfModule>
3. Save the File: After adding the code, save the .htaccess file and upload it to your server.
For Nginx Server
1. Edit the Nginx Configuration File:
- Open your Nginx configuration file, usually found at /etc/nginx/nginx.conf or in a site-specific configuration file within the /etc/nginx/sites-available/ directory.
2. Add the Following Code within the http { } Block:
http { gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
gzip_min_length 256;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
}
3. Save and Restart Nginx: After adding the code, save the file and restart Nginx with the following command:
Step 3: Verify Compression
After enabling compression, verify that it is working correctly. Use the same tools you used in Step 1 to check if your pages are now compressed. Alternatively, you can check the response headers in your browser’s developer tools; look for Content-Encoding: gzip or Content-Encoding: br.
Step 4: Re-run the Semrush Audit
Finally, re-run the Semrush site audit to ensure that the “Uncompressed pages” issue has been resolved. If the audit still flags uncompressed pages, double-check your configuration and ensure there are no syntax errors in your server configuration files.
Additional Tips
- Monitor Performance: Regularly monitor your site’s performance to ensure compression remains enabled and effective.
- Use a Content Delivery Network (CDN): Many CDNs offer built-in compression, which can further improve your site’s performance and reliability.
By following these steps, you can effectively resolve the “Uncompressed pages” issue, leading to faster page load times, improved SEO, and a better user experience. If none of the solutions mentioned above prove effective, feel free to reach out to our team for personalized assistance with resolving this issue.