Check engine light on on 2004 Subaru Forester

Check engine light came on while driving. Stopped the car and checked the usual ... was the gas cap on tight. Took off, put back on ... making sure it was clicking ... started the car again. Light was still on. Waited 24 hours and tried again. Light still on. Is it safe to drive?

1 answer
Check engine lights almost always have to do with emissions system of the car, it should be fine to drive.