The IRS doesn't allow e-filing of tax returns once that tax year's window has closed. The e-filing window lasts from January to mid-October, immediately after the tax year ends. For example, 2017 personal (1040) returns could be e-filed from January through mid-October of 2018.
If you need to file a tax return from 2017 or earlier, you can print and mail in your return.
There's one exception: 2017 corporate and partnership returns can still be e-filed.