Up to After Effects CS6 it was possible to export Films to MP4 – H264 but in new versions this does not seem possible anymore.
In After Effects CC 2013 you can re-enable this feature in your preferences under the tab “Output” – “Show deprecated formats”.
Unfortunately, in CC 2014 and newer Versions of After Effects this feature was entirely removed. Adobe wants its users to export to Adobe Media Encoder. This comes at a fatal price though.
Adobe Media Encoder does not use Multi-Processing for rendering multiple frames simultaneously on each Processor-Core, meaning your renders will take much longer than before.