The safest way to get the installer is directly from Apple Support , which provides a verified "fixed" DMG file that includes the necessary certificates to prevent "expired" installation errors.
The downloaded file ( InstallMacOSX.dmg ) is a disk image that contains an installer package, not the final app. Follow these steps to extract the real installer: mac os x el capitan 10116 installer dmg download fixed
Download OS X El Capitan 10.11 via Apple Support (Use Safari for the best results). The safest way to get the installer is