Does internet history get checked during security clearance investigation?

Try this first:
Clearancejogsblog: Guide to Completing the New SF-86

Also, google for the SF-86 and read the questions. They clearly state the time each question applies to. They vary from 5 years, 7 years, 10 years, or EVER.

Regarding whether the investigator will have access to your internet activities, it’s unclear to what degree they will. They’ve asserted they will want to review your public internet activities like facebook, other social media, etc. They may ask you to provide your account usernames so they can search. It’s unlikely they’ll have access to your emails. They’ve made statements they do not intend to ask for your passwords.

They will have “access” to your medical records if you indicate you’ve sought mental health services. In practice all they do is ask the doctor whether your mental health condition makes you a risk to national security and whether you comply with the treatment plan, if there is one.