You have tried to install an update for El Capitan, this update can only be installed
if your mac is already running an earlier version of El Capitan.
You need the full installer app if you want to upgrade your mac to Mac OS X El Capitan.
The only problem is that El Capitan will still have the same problem connecting to websites as Yosemite.
On the 30th of September certificates for browsers expired meaning you receive the error message you described.
Follow the instructions below to download valid certificates and install them to your keychain,
Click on the link below,
https://letsencrypt.org/certificates/
Down load these two files
ISRG Root X1
Self Signed click on the der to download
And ISRG Root X2
Self signed click on der to download.
Open the Keychain Access app in your Applications> Utility folder.
In the left column highlight System.
Click on File in the menubar and click on Import Items,
select the newly downloaded files in turn and press Open.
Double-click on one of the newly imported certificates, click on the disclosure triangle
and next to When using this certificate: change Use System Defaults to Always Trust.
Do the same for the other certificate.
Restart your mac.
If you still want to upgrade to Mac OS X El Capitan 10.11.6 follow these instructions.
Open your Safari browser and click on the link below,
How to get old versions of macOS – Apple Support
Go to Download OS and click on OS X El Capitan 10.11
this downloads InstallMacOSX.dmg to your Downloads folder.
The next section can only be done on a mac that is capable of running El Capitan.
This includes macs that have the potential to run El Capitan but have been upgraded to a newer OS.
A mac that came preinstalled with an OS later than El Capitan will refuse to do the next bit.
When downloaded open to InstallMacOSX.pkg, double-click on
that and an installation window will open, this does not install El Capitan
but converts the InstallMacOSX.pkg to the Install OS X El Capitan.app which
you will find in your Applications folder, it should be 6.2GBs in size.
(If the installation window asks which disk you want to install to, you must pick
the disk that you are booted to at the time. Not any internal or external disk that
you want to eventually install El Capitan on, that is for later.)
To start the installation of El Capitan double click on the Install OS X El Capitan.app.
The copy of the install app self deletes after installing El Capitan, so make sure you keep a copy of the
InstallMacOSX.dmg if you need it in future, or you could just make a copy of the Install OS X El Capitan.app
prior to installing and moving it to an external drive for safe keeping.
It is also possible to create a bootable USB installer disk using the Install OS X El Capitan.app in the Applications
folder and the createinstallmedia command in the Terminal app.
Read the instructions here,
How to create a bootable installer for macOS – Apple Support