Naturally, you were experiencing the deindexing problem (which means that some Google guy must have declared your site as spammy and kicked it out of the index).
Possible reasons:
- Accidently blocked the page with the robots meta tag/ robots.txt (check webmaster tool for messages – also check for crawl errors)
- All internal links to the page down as no-follow
- Penalized by Google for breaking their guidelines, e.g., cloaking, paid links, etc.
- Building up too many backlinks in too short a time
- Not actually being de-indexed but dropped low in the SERPS (use the site command to double-check). Perhaps duplicate content or slow loading speeds have pushed you down.
- Hosting multiple sites on the same hosting account, i.e., a problem with one domain, affects all.
- Canonicalization and duplicate content issues
- URLs don’t exist in sitemaps.
- Ensure code written all in HTML or XHTML and DOCTYPE declaration is upper case
What to do:
- URL Inspect in Google Search Console
- Address the possible reasons, i.e., make sure robots aren’t blocking the page, etc.
- Gain links at a steady pace, so Google knows your site is still active.
- Re-submit to webmaster tools and ensure you follow the guidelines