Reduce render file size in After Effects CC 2017
To render H.264 it's actually very easy.


From your Project window, select the sequence you wish to render.
Right click->Export Media (or File->Export Media)
In the Video tab, select H.264 for format


Then, in the basic video settings below, you can change to smaller-than-original resolution, low bit rates, etc.

If you are trying to export a Quicktime file that uses H.264, that's much more challenging.  When you select Quicktime, Premiere Pro gives you a useless menu of Presets that were relevant for about six months during the early 1990s.  Ignore all of them, as they are stupid.  Instead, look down to where there's a Video Codec selector.  Click on that and you'll see tons of options, including H.264.