Best render options for custom size movie in after effects
Are you using the inbuilt After Effects render queue? It's a bit easier to use custom settings when you use the Adobe Media Encoder instead. AME comes with After Effects and is installed automatically when you install AE. Simply open the composition you want to export in After Effects and select Composition → Add to Adobe Media Encoder Queue. This will open AME and add the current state of your composition to the render queue (this might take some time). Once you see the item in the render queue, press the highlighted format designation to open the Export Settings dialogue. 





In the Export Settings, you can change the format (codec/container) as well as the other export parameters. Make sure to set the dimensions (Width/Height) to whatever you need them to be. To bring down the size, the most important option is the bitrate setting (Target / Maximum Bitrate for H.264).

Read this for an explanation of bitrate and it's relation to the resolution of your video and this for the math you need to figure out the appopriate bitrate dependent of your desired output size. Since you mentioned you need the video for your website, you might also be interested in my post here regarding recommended encoding settings for web video.