AddType
AddType is a directive used in web server configuration, most notably Apache HTTP Server and its successor Nginx, to explicitly define the MIME type for a given file extension. This directive is crucial for ensuring that web browsers correctly interpret and display the content of various file types. When a web server encounters a file, it uses its extension to determine the appropriate MIME type, which is then sent to the client in the Content-Type HTTP header.
By default, web servers have a predefined mapping of file extensions to MIME types. However, if a
The importance of correct MIME type handling extends to search engine optimization and web application functionality.