Enabling GZIP compression for your website is important. Because it reduces the network bandwidth required to display a page. Your readers will thank you for not wasting any bytes in their data plan. In addition to that, pages will also load faster as a result, specially if you are using a slower connection.
Anyway some of you are already thinking of creating a ‘.htaccess’ file, because that is what you used to do before you started using Azure right? ‘.htaccess’ files are only found on Apache servers. Azure uses something different, called a ‘web.config’ file.
Basic or Standard pricing plan: does not work on the ‘Free’ and ‘Shared’ hosting options.
To find the ‘web.config’ file, log in to your FTP server on Azure using FileZilla (or something similar).
To find your login credentials for the FTP server, open Azure Portal.
At the Azure Portal, scroll down. You will find the login credentials there (with the exception of the password.
Navigate to ‘/site/wwwroot’, there you will find the ‘web.config’ file & download it.
To enable GZIP compression you need to add the lines marked below to your ‘web.config’ file. Then upload it back to to the FTP server using FileZilla.
You cannot enable GZIP compression if you are using a ‘FREE’ or ‘SHARED’ plan to host your website on Azure. You need at least a ‘BASIC’ or ‘STANDARD’ plan.
And you have to admit, that ‘web.config’ file looks way prettier than that messy ‘.htaccess’ file you used to have with Apache!